cloudron-setup: add AVX check for 7.6 and beyond

This commit is contained in:
Girish Ramakrishnan
2023-09-02 12:02:37 +05:30
parent f22a2b2053
commit 8f9bc8817d
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ async function canUpdate(boxUpdateInfo) {
if (!ubuntuVersion) throw new BoxError(BoxError.INTERNAL_ERROR, 'Could not determine ubuntu release');
if (ubuntuVersion.trim() === '18.04' && semver.gte(boxUpdateInfo.version, '7.5.0')) throw new BoxError(BoxError.BAD_STATE, `${boxUpdateInfo.version} requires atleast Ubuntu 20.04. Please upgrade following https://docs.cloudron.io/guides/upgrade-ubuntu-20/`);
// mongodb 6 requires AVX
// mongodb 5 requires AVX
if (semver.gte(boxUpdateInfo.version, '7.6.0')) {
const avxOutput = safe.child_process.execSync('grep avx /proc/cpuinfo', { encoding: 'utf8' });
if (avxOutput === null) throw new BoxError(BoxError.BAD_STATE, `${boxUpdateInfo.version} requires AVX support`);