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
This commit is contained in:
Andrey Lushnikov 2021-02-16 10:23:38 -08:00 committed by GitHub
parent 6b40d75d03
commit f2b25fe6bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';
}