Skip to content
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

Merged
merged 1 commit into from
Oct 15, 2019
Merged

fix: download x86 versions of Node.js #11560

merged 1 commit into from
Oct 15, 2019

Conversation

alexeykuzmin
Copy link
Contributor

@alexeykuzmin alexeykuzmin commented Oct 14, 2019

@alexeykuzmin alexeykuzmin changed the title fix: download x86 versions fix: download x86 versions of Node.js Oct 14, 2019
'node-v' + version + '-' + osPlat + '-' + os.arch();
let urlFileName: string = osPlat == 'win32'? fileName + '.7z':
fileName + '.tar.gz';
const arch = (osArch === 'ia32') ? 'x86' : osArch;
Copy link
Contributor Author

@alexeykuzmin alexeykuzmin Oct 14, 2019

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`;

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?

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; 

Copy link
Contributor Author

@alexeykuzmin alexeykuzmin Oct 15, 2019

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.

@damccorm
Copy link

Could you update this file's task.json version and task.loc.json? Should be version 1.160.0

Node.js uses "x86" and not "ia32" as an os arch identifier in download URLs.
@alexeykuzmin alexeykuzmin requested a review from damccorm October 15, 2019 12:58
Copy link

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@damccorm damccorm merged commit 198956c into microsoft:master Oct 15, 2019
leantk pushed a commit that referenced this pull request Dec 23, 2019
Node.js uses "x86" and not "ia32" as an os arch identifier in download URLs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants