From f2b25fe6bd9be62bd7672a721deebcfc508b6ab9 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 16 Feb 2021 10:23:38 -0800 Subject: [PATCH] fix: do not rely on $PATH when resolving executables (#5475) Since CRON jobs reset $PATH to a very basic one, we should use only direct paths to system executables. Fixes #5469 --- src/utils/registry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/registry.ts b/src/utils/registry.ts index 610966e34e..437ca44a86 100644 --- a/src/utils/registry.ts +++ b/src/utils/registry.ts @@ -136,7 +136,7 @@ export const hostPlatform = ((): BrowserPlatform => { let arm64 = false; // BigSur is the first version that might run on Apple Silicon. if (major >= 11) { - arm64 = execSync('sysctl -in hw.optional.arm64', { + arm64 = execSync('/usr/sbin/sysctl -in hw.optional.arm64', { stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim() === '1'; }