From d914e756251d2b2cb38138b0465e7d78082f6267 Mon Sep 17 00:00:00 2001 From: "J. Quak" Date: Thu, 25 Jul 2024 09:14:26 +0200 Subject: [PATCH] fix: able to skip update check (#468) Co-authored-by: Jordy Quak --- src/bb-components-build.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bb-components-build.ts b/src/bb-components-build.ts index df639814..126b99a0 100644 --- a/src/bb-components-build.ts +++ b/src/bb-components-build.ts @@ -62,6 +62,7 @@ program 'the runtime option to build for', 'v1', ) + .option('--offline', 'skip update check') .option('--fast', 'Build the last edited component.') .parse(process.argv); @@ -73,6 +74,7 @@ const enableNewTranspile = !!options.transpile; const arg = process.argv.slice(2); const startTime = Date.now(); const buildAll = !arg.includes('--fast'); +const hasOfflineFlag = arg.includes('--offline'); /* execute command */ @@ -364,7 +366,9 @@ const readInteractions: () => Promise = async (): Promise< // eslint-disable-next-line no-void void (async (): Promise => { - await checkUpdateAvailableCLI(); + if (!hasOfflineFlag) { + await checkUpdateAvailableCLI(); + } const { runtimeVersion = 'v1' } = options;