-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: download x86 versions of Node.js #11560
Conversation
Tasks/UseNodeV1/installer.ts
Outdated
'node-v' + version + '-' + osPlat + '-' + os.arch(); | ||
let urlFileName: string = osPlat == 'win32'? fileName + '.7z': | ||
fileName + '.tar.gz'; | ||
const arch = (osArch === 'ia32') ? 'x86' : osArch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual fix.
Everything else is a clean-up.
let exeUrl: string; | ||
let libUrl: string; | ||
try { | ||
exeUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.exe`; | ||
libUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.lib`; | ||
exeUrl = `https://nodejs.org/dist/v${version}/win-${osArch}/node.exe`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the change be made here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, maybe just move the change up to where we define osArch in line 8? That way it propogates to error messages too. So it could be
const arch = os.arch();
const osArch = (arch === 'ia32') ? 'x86' : arch;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, 'x86' should be used in all cases here. Done.
Could you update this file's task.json version and task.loc.json? Should be version |
Node.js uses "x86" and not "ia32" as an os arch identifier in download URLs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Node.js uses "x86" and not "ia32" as an os arch identifier in download URLs.
Node.js uses "x86" and not "ia32" as an os arch identifier in download URLs.
Check here: