Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bicep decompile-params generates invalid output with error BCP051 #13785

Open
peter-bertok opened this issue Apr 4, 2024 · 1 comment
Open

Comments

@peter-bertok
Copy link

Bicep version
Bicep CLI version 0.26.54 (5e20b29)

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.

@OranguTech
Copy link

OranguTech commented Apr 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

4 participants