az bicep prints version information when check_version is false
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
When publishing bicep modules ("az publish") to our container registry, we receive the below output for each file:
> Bicep CLI is already installed at '/agent/_work/_temp/.azclitask/bin/bicep'. Skipping installation as no specific version was requested.
We deploy around 100 files to the registry. This line is printed for every file, bloats the output and makes troubleshooting tedious.
We set the below flag, but it does not stop the output:
`az config set bicep.check_version=false`
Possible source: https://github.com/Azure/azure-cli/blob/2a6319e38494ba1a316b04391ad0d8a8cf86068b/src/azure-cli/azure/cli/command_modules/resource/_bicep.py#L137C13-L137C18
### Related command
```
az config set bicep.check_version=false
az bicep publish --file $filePath --target "br:*****.azurecr.io/infrastructure/bicep/imports:$importName" --with-source --force
```
### Errors
Bicep CLI is already installed at '/agent/_work/_temp/.azclitask/bin/bicep'. Skipping installation as no specific version was requested.
### Issue script & Debug output
cli.knack.cli: Command arguments: ['bicep', 'publish', '--file', '.\\Bicep\\Imports\\Functions.bicep', '--target', 'br:*****.azurecr.io/infrastructure/bicep/imports:functions', '--with-source', '--force', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'bicep': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: resource 1.245 52 234
cli.azure.cli.core: Total (1) 1.245 52 234
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 52 groups, 234 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : bicep publish
cli.azure.cli.core: Command table: bicep publish
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '***\.azure\commands\2025-12-26.09-59-08.bicep_publish.25284.log'.
az_command_data_logger: command args: bicep publish --file {} --target {} --with-source --force --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x000001417EA36700>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x000001417EA5CA40>, .add_cache_arguments at 0x000001417EA5CC20>, .update_breaking_change_info at 0x000001417EA5CCC0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x000001417EA5CAE0>]
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
Bicep CLI is already installed at '***\.azure\bin\bicep.exe'. Skipping installation as no specific version was requested.
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Bicep CLI installation path: ***\.azure\bin\bicep.exe
cli.azure.cli.command_modules.resource._bicep: Bicep CLI installed: True.
cli.knack.cli: Event: CommandInvoker.OnTransformResult [, ]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 0
cli.__main__: Command ran in 12.232 seconds (init: 1.108, invoke: 11.124)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3745 in cache file under ***\.azure\telemetry\20251226095918373
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc ***\.azure ***\.azure\telemetry\20251226095918373"
telemetry.process: Return from creating process 16848
telemetry.main: Finish creating telemetry upload process.
### Expected behavior
Setting bicep check_version=false should disable version related outputs, or version related outputs should be behind --debug.
### Environment Summary
`az --version`
> azure-cli 2.81.0
>
> core 2.81.0
> telemetry 1.1.0
>
> Extensions:
> account 0.2.5
> application-insights 1.2.3
> automation 1.0.0b1
> azure-devops 1.0.2
> azure-firewall 2.0.0
> datafactory 1.0.4
> dns-resolver 1.2.0
> front-door 1.4.0
> logic 1.1.0
> maintenance 1.7.0b1
> ml 2.40.1
> monitor-control-service 1.2.0
> notification-hub 2.0.0b1
> portal 1.0.0b2
> reservation 0.3.1
> resource-graph 2.1.1
> site-recovery 1.0.0
> ssh 2.0.6
>
> Dependencies:
> msal 1.34.0b1
> azure-mgmt-resource 23.3.0
>
> Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
> Config directory 'C:\Users\HalWaggoner\.azure'
> Extensions directory 'C:\Users\HalWaggoner\.azure\cliextensions'
>
> Python (Windows) 3.13.9 (tags/v3.13.9:8183fa5, Oct 14 2025, 14:09:13) [MSC v.1944 64 bit (AMD64)]
>
> Legal docs and information: aka.ms/AzureCliLegal
>
>
> Your CLI is up-to-date.
`az bicep version`
> Bicep CLI version 0.39.26 (1e90b06e40)
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.