Skip to content
This repository has been archived by the owner on Jul 18, 2018. It is now read-only.

Commit

Permalink
DevTools: fix npm_test architecture check
Browse files Browse the repository at this point in the history
process.arch is based on the architecture which node.js was compiled for,
not necessarily the architecture of the system the node.js process is
currently running in.

I came across this issue while working on buildbot related stuff.

More info:
nodejs/node-v0.x-archive#2862

BUG=none

Review-Url: https://codereview.chromium.org/2698983004
Cr-Commit-Position: refs/heads/master@{#451511}
  • Loading branch information
wwwillchen authored and Commit bot committed Feb 19, 2017
1 parent dfb5d07 commit 250263f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions third_party/WebKit/Source/devtools/scripts/npm_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,10 @@ function copyFrontend(contentShellResourcesPath) {

function getPlatform() {
if (process.platform === 'linux') {
if (process.arch === 'x64')
return 'Linux_x64';
throw new Error('Pre-compiled content shells are only available for x64 on Linux');
return 'Linux_x64';
}
if (process.platform === 'win32') {
if (process.arch === 'x64')
return 'Win_x64';
return 'Win';
return 'Win_x64';
}
if (process.platform === 'darwin')
return 'Mac';
Expand Down

0 comments on commit 250263f

Please sign in to comment.