Skip to content

Commit aa0152b

Browse files
isaacsruyadorno
authored andcommitted
Detect CI properly in flatOptions generation
* Also, test this with a mock, so that tests pass in CI. * test: streamline snapshot on config test * test: add workaround for node 10's broken promises * test: make cache dir cross-platform consistent in config test PR-URL: #1719 Credit: @isaacs Close: #1719 Reviewed-by: @ruyadorno
1 parent 9f200ab commit aa0152b

4 files changed

Lines changed: 462 additions & 2269 deletions

File tree

lib/utils/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const {
99
}
1010
} = require('@npmcli/config')
1111

12+
const ciDetect = require('@npmcli/ci-detect')
13+
1214
const isWindows = require('./is-windows.js')
1315

1416
const editor = process.env.EDITOR ||
@@ -132,7 +134,7 @@ const defaults = {
132134
'prefer-online': false,
133135
preid: '',
134136
production: process.env.NODE_ENV === 'production',
135-
progress: !process.env.TRAVIS && !process.env.CI,
137+
progress: !ciDetect(),
136138
proxy: null,
137139
'https-proxy': null,
138140
noproxy: null,

0 commit comments

Comments
 (0)