Skip to content

Commit

Permalink
Detect CI properly in flatOptions generation
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
isaacs authored and ruyadorno committed Aug 25, 2020
1 parent 9f200ab commit aa0152b
Show file tree
Hide file tree
Showing 4 changed files with 462 additions and 2,269 deletions.
4 changes: 3 additions & 1 deletion lib/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const {
}
} = require('@npmcli/config')

const ciDetect = require('@npmcli/ci-detect')

const isWindows = require('./is-windows.js')

const editor = process.env.EDITOR ||
Expand Down Expand Up @@ -132,7 +134,7 @@ const defaults = {
'prefer-online': false,
preid: '',
production: process.env.NODE_ENV === 'production',
progress: !process.env.TRAVIS && !process.env.CI,
progress: !ciDetect(),
proxy: null,
'https-proxy': null,
noproxy: null,
Expand Down
Loading

0 comments on commit aa0152b

Please sign in to comment.