mirror of https://github.com/kubernetes/kops.git
Dump invalid HCL if we hit it
This commit is contained in:
parent
0224883aba
commit
fa1be5371c
|
|
@ -121,6 +121,10 @@ func hclPrint(node ast.Node) ([]byte, error) {
|
|||
// Apply Terraform style (alignment etc.)
|
||||
formatted, err := hcl_printer.Format([]byte(s))
|
||||
if err != nil {
|
||||
glog.Errorf("Invalid HCL follows:")
|
||||
for i, line := range strings.Split(s, "\n") {
|
||||
glog.Errorf("%d\t%s", (i + 1), line)
|
||||
}
|
||||
return nil, fmt.Errorf("error formatting HCL: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue