From cabc0f07a9102a769eeb54de2b2c6b0c1a979b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 20 Aug 2018 15:41:52 -0700 Subject: [PATCH] update-notifier: skip checking for updates in CI environments PR-URL: https://github.com/npm/cli/pull/33 Credit: @Sibiraj-S Reviewed-By: @zkat --- bin/npm-cli.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/npm-cli.js b/bin/npm-cli.js index e4da63c9795d3..6f76b23828531 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')