Skip to content

Commit 9b29e85

Browse files
authored
fix: install scripts for windows arm64 target (microsoft#225629)
1 parent 3ef94c3 commit 9b29e85

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

build/.cachesalt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-08-08T03:47:49.879Z
1+
2024-08-14T18:12:43.548Z

build/npm/postinstall.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ for (let dir of dirs) {
8181
}
8282
}
8383

84-
if (/^(.build\/distro\/npm\/)?remote/.test(dir) && process.platform === 'win32' && (process.arch === 'arm64' || process.env['npm_config_arch'] === 'arm64')) {
85-
// windows arm: do not execute `yarn` on remote folder
86-
continue;
87-
}
88-
8984
let opts;
9085

9186
if (dir === 'build') {

build/npm/preinstall.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,7 @@ function installHeaders() {
122122
cp.execFileSync(node_gyp, ['install', '--dist-url', local.disturl, local.target], { shell: true });
123123
}
124124

125-
// Avoid downloading headers for Windows arm64 till we move to Nodejs v19 in remote
126-
// which is the first official release with support for the architecture. Downloading
127-
// the headers for older versions now redirect to https://origin.nodejs.org/404.html
128-
// which causes checksum validation error in node-gyp.
129-
//
130-
// gyp http 200 https://origin.nodejs.org/404.html
131-
// gyp WARN install got an error, rolling back install
132-
// gyp ERR! install error
133-
// gyp ERR! stack Error: win-arm64/node.lib local checksum 4c62bed7a032f7b36984321b7ffdd60b596fac870672037ff879ae9ac9548fb7 not match remote undefined
134-
//
135-
if (remote !== undefined && !versions.has(remote.target) &&
136-
process.env['npm_config_arch'] !== "arm64" &&
137-
process.arch !== "arm64") {
125+
if (remote !== undefined && !versions.has(remote.target)) {
138126
// Both disturl and target come from a file checked into our repository
139127
cp.execFileSync(node_gyp, ['install', '--dist-url', remote.disturl, remote.target], { shell: true });
140128
}

0 commit comments

Comments
 (0)