Skip to content

Commit

Permalink
cli: literally don't run update-notifier in CI environment
Browse files Browse the repository at this point in the history
This is a followup to npm#33 that changes the logic to literally *not* run update-notifier
in CI environment, instead of running it and omitting the result.
  • Loading branch information
mislav committed Sep 3, 2018
1 parent 59e5056 commit e1eec1b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/npm-cli.js
Expand Up @@ -78,16 +78,15 @@
if (er) return errorHandler(er)
if (
!isGlobalNpmUpdate &&
!require('ci-info').isCI &&
npm.config.get('update-notifier') &&
!unsupported.checkVersion(process.version).unsupported
) {
const pkg = require('../package.json')
let notifier = require('update-notifier')({pkg})
const isCI = require('ci-info').isCI
if (
notifier.update &&
notifier.update.latest !== pkg.version &&
!isCI
notifier.update.latest !== pkg.version
) {
const color = require('ansicolors')
const useColor = npm.config.get('color')
Expand Down

0 comments on commit e1eec1b

Please sign in to comment.