Azure / Azure/azure-quickstart-templates

Error message about using --force argument for decompile doesn't work from az CLI

Open
#12,552 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

1) create arm template main.json:
```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"functions": [],
"variables": {},
"resources": [],
"outputs": {}
}
```
2) az bicep decompile -f main.json
3) do it again: az bicep decompile -f main.json
4)
```
The output path "/Users/stephenweatherford/repos/template-examples/ttk/artifacts-parameter/pass/raw-repo-path/main.bicep" already exists. Use --force to overwrite the existing file.
```
Unfortunately for az bicep there is no --force option. Does it need to be added? Is this a powershell issue as well?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the two `az bicep decompile -f main.json` commands described in the report and start from the Azure CLI `bicep decompile` entry point. Trace where the existing-output error is generated and determine whether the CLI should accept `--force` or change the message; done when the repeated command has consistent, documented behavior and coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.