hcl/fmtcmd: include filename in error

This commit is contained in:
Mitchell Hashimoto 2017-01-08 16:13:04 -08:00
parent 80e628d796
commit e930f8e5fe
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A

View File

@ -58,7 +58,7 @@ func processFile(filename string, in io.Reader, out io.Writer, stdin bool, opts
res, err := printer.Format(src)
if err != nil {
return err
return fmt.Errorf("In %s: %s", filename, err)
}
if !bytes.Equal(src, res) {