diff --git a/ts/build/notarize.ts b/ts/build/notarize.ts index f3d4b008eaab..b84c970c93ea 100644 --- a/ts/build/notarize.ts +++ b/ts/build/notarize.ts @@ -50,11 +50,12 @@ async function go() { } console.log('Notarizing with...'); - console.log(` files: ${appPaths.join(', ')}`); console.log(` primaryBundleId: ${appBundleId}`); console.log(` username: ${appleId}`); for (const appPath of appPaths) { + console.log(` file: ${appPath}`); + // eslint-disable-next-line no-await-in-loop await notarize({ appBundleId, diff --git a/ts/updater/common.ts b/ts/updater/common.ts index 5489f083f7c3..960ca8f62361 100644 --- a/ts/updater/common.ts +++ b/ts/updater/common.ts @@ -390,13 +390,16 @@ export abstract class Updater { try { // We might be running under Rosetta - if (promisify(execFile)('uname', ['-m']).toString().trim() === 'arm64') { + const flag = 'sysctl.proc_translated'; + const { stdout } = await promisify(execFile)('sysctl', ['-i', flag]); + + if (stdout.includes(`${flag}: 1`)) { this.logger.info('updater: running under Rosetta'); return 'arm64'; } } catch (error) { this.logger.warn( - `updater: "uname -m" failed with ${Errors.toLogFormat(error)}` + `updater: Rosetta detection failed with ${Errors.toLogFormat(error)}` ); }