From 5192505f6b6c083c2e575e980d2fc0efc4905669 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Mon, 8 Jan 2018 19:55:51 -0800 Subject: [PATCH] is-ci check --- package.json | 1 + src/updater.ts | 1 + yarn.lock | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d9be332c..1156cd49 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "globby": "^7.1.1", "graceful-fs": "^4.1.11", "http-call": "^4.0.8", + "is-ci": "^1.1.0", "klaw": "^2.1.1", "log-chopper": "^1.0.2", "moment": "^2.20.1", diff --git a/src/updater.ts b/src/updater.ts index fbf88cb4..a7a762c0 100644 --- a/src/updater.ts +++ b/src/updater.ts @@ -273,6 +273,7 @@ export class Updater { private async autoupdateNeeded(): Promise { try { + if (require('is-ci').isCI) return false const m = await mtime(this.autoupdatefile) return m.isBefore(deps.moment().subtract(5, 'hours')) } catch (err) { diff --git a/yarn.lock b/yarn.lock index 8aa8b05b..fc1fb84b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1549,7 +1549,7 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" -is-ci@^1.0.10: +is-ci@^1.0.10, is-ci@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" dependencies: @@ -3175,6 +3175,12 @@ ts-jest@^22.0.1: source-map-support "^0.5.0" yargs "^10.0.3" +ts-lodash@4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/ts-lodash/-/ts-lodash-4.0.10.tgz#64df9c4febea204de6ce66ac614a6f1f160c2931" + dependencies: + lodash "^4.17.4" + ts-lodash@4.0.9, ts-lodash@^4.0.8: version "4.0.9" resolved "https://registry.yarnpkg.com/ts-lodash/-/ts-lodash-4.0.9.tgz#088d7ceefbf36c8c4bcdf28372249015ccafd429"