Skip to content

Commit

Permalink
fix: do not rely on $PATH when resolving executables (#5475)
Browse files Browse the repository at this point in the history
Since CRON jobs reset $PATH to a very basic one, we should
use only direct paths to system executables.

Fixes #5469
  • Loading branch information
aslushnikov committed Feb 16, 2021
1 parent 6b40d75 commit f2b25fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/registry.ts
Expand Up @@ -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';
}
Expand Down

0 comments on commit f2b25fe

Please sign in to comment.