Skip to content

Commit

Permalink
fix: support registry (midwayjs#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
echosoar authored Apr 19, 2020
1 parent f0a2390 commit 2a7abf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/faas-cli-plugin-package/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,15 +441,15 @@ export class PackagePlugin extends BasePlugin {
if (!existsSync(pkgJson)) {
writeFileSync(pkgJson, '{}');
}
const register = this.options.register ? ` --registry=${this.options.register}` : '';
const registry = this.options.registry ? ` --registry=${this.options.registry}` : '';
exec(
`${this.options.npm || 'npm'} install ${
options.npmList
? `${options.npmList.join(' ')}`
: options.production
? '--production'
: ''
}${register}`,
}${registry}`,
{ cwd: installDirectory },
err => {
if (err) {
Expand Down

0 comments on commit 2a7abf3

Please sign in to comment.