Skip to content

Commit

Permalink
Copy right dll/exe based on npm_config_arch
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Aug 11, 2024
1 parent 8c0a6d7 commit 211e251
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 211e251

Please sign in to comment.