mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-18 22:11:39 -04:00
packer fix: state that the command does not work for hcl files (#11238)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user