Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ci.js
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-03-09 03:22:54 +0300
committerisaacs <i@izs.me>2021-03-18 21:54:42 +0300
commit46e14bd0ff566f94e8f86f9d972bf089c000da52 (patch)
treee6b478f20fd306f149e508fdacc373f7f1bba124 /lib/ci.js
parentb395763f002457866d8bf4bf37858f69459f1d30 (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.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ci.js b/lib/ci.js
index 3ea199376..692efe3e5 100644
--- a/lib/ci.js
+++ b/lib/ci.js
@@ -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,