[build] Fix --(skip)all-platforms from linux-arm64 (#141247)

This fixes a node architecture check where x64 was assumed and
incorrectly downloaded on arm64 bases.  This only effects builds not
using the `--all-platforms` flag.

Testing
`node scripts/build` on linux-arm64 should work
This commit is contained in:
Jonathan Budzenski 2022-09-23 16:47:51 -05:00 committed by GitHub
parent 674f758d2a
commit 1df58fdc6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -146,7 +146,7 @@ describe('#getNodePlatforms()', () => {
});
const platforms = config.getNodePlatforms();
expect(platforms).toBeInstanceOf(Array);
if (process.platform !== 'linux') {
if (!(process.platform === 'linux' && process.arch === 'x64')) {
expect(platforms).toHaveLength(2);
expect(platforms[0]).toBe(config.getPlatformForThisOs());
expect(platforms[1]).toBe(config.getPlatform('linux', 'x64'));

View file

@ -154,7 +154,7 @@ export class Config {
return ALL_PLATFORMS;
}
if (process.platform === 'linux') {
if (process.platform === 'linux' && process.arch === 'x64') {
return [this.getPlatform('linux', 'x64')];
}