diff options
author | Gar <gar+gh@danger.computer> | 2021-03-09 03:22:54 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2021-03-18 21:54:42 +0300 |
commit | 46e14bd0ff566f94e8f86f9d972bf089c000da52 (patch) | |
tree | e6b478f20fd306f149e508fdacc373f7f1bba124 /lib/ci.js | |
parent | b395763f002457866d8bf4bf37858f69459f1d30 (diff) |
chore(config): remove flatOptions references
Iterative change moving us towards a more unified config.
No longer pulling config from flatOptions where we don't have to.
PR-URL: https://github.com/npm/cli/pull/2892
Credit: @wraithgar
Close: #2892
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/ci.js')
-rw-r--r-- | lib/ci.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -30,14 +30,13 @@ class CI extends BaseCommand { } async ci () { - if (this.npm.flatOptions.global) { + if (this.npm.config.get('global')) { const err = new Error('`npm ci` does not work for global packages') err.code = 'ECIGLOBAL' throw err } const where = this.npm.prefix - const { scriptShell, ignoreScripts } = this.npm.flatOptions const arb = new Arborist({ ...this.npm.flatOptions, path: where }) await Promise.all([ @@ -54,6 +53,7 @@ class CI extends BaseCommand { // npm ci should never modify the lockfile or package.json await arb.reify({ ...this.npm.flatOptions, save: false }) + const ignoreScripts = this.npm.config.get('ignore-scripts') // run the same set of scripts that `npm install` runs. if (!ignoreScripts) { const scripts = [ @@ -65,6 +65,7 @@ class CI extends BaseCommand { 'prepare', 'postprepare', ] + const scriptShell = this.npm.config.get('script-shell') || undefined for (const event of scripts) { await runScript({ path: where, |