Commit 396f1df7 authored by mercury233's avatar mercury233

fix checkRosetta error

parent 4391e495
Pipeline #15395 passed with stages
in 3 minutes and 19 seconds
......@@ -15,7 +15,11 @@ export async function checkRosetta() {
isRosetta = result.stdout.includes(`${sysctlRosettaInfoKey}: 1`);
console.log(`Checked for macOS Rosetta environment (isRosetta=${isRosetta})`);
} catch (e) {
console.error(`sysctl shell command to check for macOS Rosetta environment failed: ${e}`);
if (e.message.includes('unknown oid')) {
console.log('sysctl shell command cant recognize sysctl.proc_translated, setting isRosetta to false');
} else {
console.error(`sysctl shell command to check for macOS Rosetta environment failed: ${e}`);
}
}
return isRosetta;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment