Skip to content

Commit

Permalink
ci: add error on ci for global packages
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiahdz authored and isaacs committed May 8, 2020
1 parent 28184a4 commit e57a991
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ function cmd(cb) {
}

async function ci () {
const where = npm.flatOptions.global
? globalTop
: npm.prefix
if (npm.flatOptions.global) {
const err = new Error('`npm ci` does not work for global packages')
err.code = 'ECIGLOBAL'
throw err
}

const where = npm.prefix
const arb = new Arborist({ ...npm.flatOptions, path: where })

try {
Expand Down

0 comments on commit e57a991

Please sign in to comment.