mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
ci(vscode-ide-companion): add platform-specific builds to fix node-pty binary mismatch
Build separate VSIXes for each platform to ensure native node-pty binaries match the user's OS, preventing "posix_spawnp failed" errors.
This commit is contained in:
parent
c2fbccc002
commit
4770324df2
2 changed files with 207 additions and 57 deletions
|
|
@ -78,21 +78,31 @@ function main() {
|
|||
},
|
||||
);
|
||||
|
||||
const isUniversalBuild = process.env.UNIVERSAL_BUILD === 'true';
|
||||
|
||||
console.log(
|
||||
'[prepackage] Installing production deps into extension dist/qwen-cli...',
|
||||
);
|
||||
run(
|
||||
npm,
|
||||
[
|
||||
'--prefix',
|
||||
bundledCliDir,
|
||||
'install',
|
||||
'--omit=dev',
|
||||
'--no-audit',
|
||||
'--no-fund',
|
||||
],
|
||||
{ cwd: bundledCliDir },
|
||||
);
|
||||
|
||||
const installArgs = [
|
||||
'--prefix',
|
||||
bundledCliDir,
|
||||
'install',
|
||||
'--omit=dev',
|
||||
'--no-audit',
|
||||
'--no-fund',
|
||||
];
|
||||
|
||||
// For universal build, exclude optional dependencies (node-pty native binaries)
|
||||
// This ensures the universal VSIX works on all platforms using child_process fallback
|
||||
if (isUniversalBuild) {
|
||||
installArgs.push('--omit=optional');
|
||||
console.log(
|
||||
'[prepackage] Universal build: excluding optional dependencies (node-pty)',
|
||||
);
|
||||
}
|
||||
|
||||
run(npm, installArgs, { cwd: bundledCliDir });
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue