Skip to content

Commit

Permalink
Fix/npm install (Postcatlab#254)
Browse files Browse the repository at this point in the history
* fix: spawn
  • Loading branch information
buqiyuan authored Mar 7, 2023
1 parent 805494d commit 8dfc260
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/node/extension-manager/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class ModuleHandler extends CoreHandler {
}
private executeByAppNpm(command: string, modules: any[], resolve, reject) {
// https://www.npmjs.com/package/bin-links
npmCli.load({ 'bin-links': false, verbose: true, prefix: this.baseDir }, loaderr => {
npmCli.load({ 'bin-links': false, verbose: true, prefix: this.baseDir, registry: this.registry }, loaderr => {
const moduleList = modules.map(({ name, version }) => (version ? `${name}@${version}` : name));
let executeCommand = ['update', 'install', 'uninstall'];
if (!executeCommand.includes(command)) {
Expand Down Expand Up @@ -165,7 +165,7 @@ export class ModuleHandler extends CoreHandler {
// this.executeBySystemNpm(command, modules, resolve)
// * Set Proxy
// * Set registry
await this.setRegistry();
// await this.setRegistry();
this.executeByAppNpm(command, modules, resolve, reject);
});
}
Expand Down

0 comments on commit 8dfc260

Please sign in to comment.