From 4d829fd9b063e95429b9a311aef5aaa2b89e14ff Mon Sep 17 00:00:00 2001 From: Christoph Gysin Date: Tue, 28 Apr 2020 15:36:57 +0300 Subject: [PATCH] feat(cli): Support disabling version check If AWS_CDK_DISABLE_VERSION_CHECK is defined, skip checking for newer versions. fixes #10974 --- packages/aws-cdk/lib/version.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/version.ts b/packages/aws-cdk/lib/version.ts index fecbe1c0e1886..93a0d8fb4b6b2 100644 --- a/packages/aws-cdk/lib/version.ts +++ b/packages/aws-cdk/lib/version.ts @@ -98,7 +98,7 @@ export async function latestVersionIfHigher(currentVersion: string, cacheFile: V } export async function displayVersionMessage(): Promise { - if (!process.stdout.isTTY) { + if (!process.stdout.isTTY || process.env.AWS_CDK_DISABLE_VERSION_CHECK) { return; }