Skip to content

Commit

Permalink
Merge pull request #704 from microsoft/tyriar/npm_arch
Browse files Browse the repository at this point in the history
Copy right dll/exe based on npm_config_arch
  • Loading branch information
Tyriar committed Aug 11, 2024
2 parents 8c0a6d7 + 4f2f641 commit cb94da7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/post-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ console.log(`\x1b[32m> Moving conpty.dll...\x1b[0m`);
if (os.platform() !== 'win32') {
console.log(' SKIPPED (not Windows)');
} else {
const windowsArch = os.arch();
let windowsArch;
if (process.env.npm_config_arch) {
windowsArch = process.env.npm_config_arch;
console.log(` Using $npm_config_arch: ${windowsArch}`);
} else {
windowsArch = os.arch();
console.log(` Using os.arch(): ${windowsArch}`);
}

if (!CONPTY_SUPPORTED_ARCH.includes(windowsArch)) {
console.log(` SKIPPED (unsupported architecture ${windowsArch})`);
} else {
Expand Down

0 comments on commit cb94da7

Please sign in to comment.