mirror of
https://github.com/hashicorp/packer.git
synced 2026-04-20 21:59:08 -04:00
change template parsing error to include warning about file extensions (#10652)
This commit is contained in:
parent
bf5b4d63da
commit
00e503388e
1 changed files with 5 additions and 1 deletions
|
|
@ -126,7 +126,11 @@ func (m *Meta) GetConfigFromJSON(cla *MetaArgs) (packer.Handler, int) {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
m.Ui.Error(fmt.Sprintf("Failed to parse template: %s", err))
|
||||
m.Ui.Error(fmt.Sprintf("Failed to parse file as legacy JSON template: "+
|
||||
"if you are using an HCL template, check your file extensions; they "+
|
||||
"should be either *.pkr.hcl or *.pkr.json; see the docs for more "+
|
||||
"details: https://www.packer.io/docs/templates/hcl_templates. \n"+
|
||||
"Original error: %s", err))
|
||||
return nil, 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue