packer fix: state that the command does not work for hcl files (#11238)

testing_hcp_rewrite_two
Adrien Delorme 5 years ago committed by GitHub
parent d25373a8d6
commit c083b53c4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,6 +50,10 @@ func (c *FixCommand) ParseArgs(args []string) (*FixArgs, int) {
}
func (c *FixCommand) RunContext(ctx context.Context, cla *FixArgs) int {
if hcl2, _ := isHCLLoaded(cla.Path); hcl2 {
c.Ui.Error("packer fix only works with JSON files for now.")
return 1
}
// Read the file for decoding
tplF, err := os.Open(cla.Path)
if err != nil {

Loading…
Cancel
Save