bicep
bicep copied to clipboard
Prompt user to overwrite json file if it already exists when building bicep file
When a user tries to build a file named "test3.bicep", if they happen to have a corresponding JSON that was not compiled from Bicep they receive this message

In this case, I would love us to instead give a message more similar to

And give them the ability to overwrite this file in place of a Bicep build. We should provide this option regardless of if this JSON file was compiled from Bicep or not. Simple naming conflict is what we should check for.
I agree. I ran into this issue, and it was somewhat workflow-breaking to have to manually delete the file.
Blocked by https://github.com/Azure/bicep/issues/8514
Suggest: won't fix.
I think the current behavior is reasonable. We will automatically replace the current JSON file if it was previously built by Bicep. If it wasn't produced by Bicep, the odds are higher that it was a mistake. I don't think we should spend time worrying about automatically a delete if the file in this case. (Low bang for buck.)