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
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-08-21 01:41:52 +0300
committerKat Marchán <kzm@zkat.tech>2018-08-21 02:17:50 +0300
commitd8e811d6adf3d87474982cb831c11316ac725605 (patch)
tree67fe6665e852e79b69e448e305f5e716a792d418 /bin/npm-cli.js
parent577144cc87b8875206680629c0464e80ee49fbc6 (diff)
update-notifier: skip checking for updates in CI environments
PR-URL: https://github.com/npm/cli/pull/33 Credit: @Sibiraj-S Reviewed-By: @zkat
Diffstat (limited to 'bin/npm-cli.js')
-rwxr-xr-xbin/npm-cli.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index e4da63c97..6f76b2382 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -83,9 +83,11 @@
) {
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
+ notifier.update.latest !== pkg.version &&
+ !isCI
) {
const color = require('ansicolors')
const useColor = npm.config.get('color')