diff --git a/docs/en/CLI.md b/docs/en/CLI.md index 99808c3ba5..ff828b91a3 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -16,6 +16,12 @@ To update an existing installation: dotnet tool update -g Volo.Abp.Cli ```` +## Global Options + +While each command may have a set of options, there are some global options those can be used with any command; + +* `--skip-cli-version-check`: Skips to check the latest version of the ABP CLI. If you don't specify, it will check the latest version and shows a warning message if there is a newer version of the ABP CLI. + ## Commands Here, the list of all available commands before explaining their details: diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index 3918a18657..84643ed543 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -41,9 +41,13 @@ namespace Volo.Abp.Cli { Logger.LogInformation("ABP CLI (https://abp.io)"); - await CheckCliVersionAsync(); - var commandLineArgs = CommandLineArgumentParser.Parse(args); + + if (!commandLineArgs.Options.ContainsKey("skip-cli-version-check")) + { + await CheckCliVersionAsync(); + } + var commandType = CommandSelector.Select(commandLineArgs); using (var scope = ServiceScopeFactory.CreateScope()) @@ -72,7 +76,7 @@ namespace Volo.Abp.Cli var currentCliVersion = await GetCurrentCliVersion(assembly); var updateChannel = GetUpdateChannel(currentCliVersion); - Logger.LogInformation($"Version {currentCliVersion} ({updateChannel} channel)"); + Logger.LogInformation($"Version {currentCliVersion} ({updateChannel})"); try {