bicep
bicep copied to clipboard
bicep decompile-params generates invalid output with error BCP051
Bicep version Bicep CLI version 0.26.54 (5e20b29b58)
Describe the bug When running:
bicep decompile-params --force --bicep-file template.bicep params.json
The output starts with the line:
using '/template.bicep'
This first line is invalid and shows the following error: The specified path begins with "/". Files must be referenced using relative paths.bicep(BCP051)
Additional context While this is easy to fix manually, I'm using this to automatically generate ".bicepparam" files. The idea is to provide a PowerShell script with a table of parameter values and bicep file names, and then have it bulk-generate these files for inclusion in source repos, pipelines, etc... Hence, it is important for the output to be immediately valid and usable as-is.
I encountered this too:
>bicep decompile-params .\envs\dev1.json --bicep-file .\calculator.bicep
First line of the resulting param file is using '/calculator.bicep'
, which should of course be '../calculator.bicep'
.
Bicep CLI version 0.26.170, Pwsh 7.4.2, Win 10 10.0.19045