diff --git a/packages/cli/src/commands/baseCommand.ts b/packages/cli/src/commands/baseCommand.ts index 3289f58d..691312cc 100644 --- a/packages/cli/src/commands/baseCommand.ts +++ b/packages/cli/src/commands/baseCommand.ts @@ -15,10 +15,10 @@ export abstract class BaseCommand extends Command { let version = process.env.CHECKLY_CLI_VERSION ?? this.config.version // use latest version from NPM if it's running from the local environment or E2E - if (version === '0.0.1-dev') { + if (version === '0.0.1-dev' || version?.startsWith('0.0.0')) { try { const { data: packageInformation } = await axios.get('https://registry.npmjs.org/checkly/latest') - this.log(`\nNotice: replacing version '${version}' with latest '${packageInformation.version}'.\n`) + this.log(`\nNotice: replacing version '${version}' with latest '${packageInformation.version}'. If you wish to test with a different version, please pass the CHECKLY_CLI_VERSION environment variable.\n`) version = packageInformation.version } catch { } }