hcl/fmtcmd: include filename in error
This commit is contained in:
parent
80e628d796
commit
e930f8e5fe
@ -58,7 +58,7 @@ func processFile(filename string, in io.Reader, out io.Writer, stdin bool, opts
|
|||||||
|
|
||||||
res, err := printer.Format(src)
|
res, err := printer.Format(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return fmt.Errorf("In %s: %s", filename, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !bytes.Equal(src, res) {
|
if !bytes.Equal(src, res) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user