internal/builtin internal/cloud internal/command Wrap Errors (#413)

This commit is contained in:
Lars Lehtonen
2023-09-18 05:16:17 -07:00
committed by GitHub
parent a502e13a9e
commit c2fd0562c1
21 changed files with 99 additions and 100 deletions

View File

@@ -208,7 +208,7 @@ func (c *FmtCommand) processFile(path string, r io.Reader, w io.Writer, isStdout
if c.diff {
diff, err := bytesDiff(src, result, path)
if err != nil {
diags = diags.Append(fmt.Errorf("Failed to generate diff for %s: %s", path, err))
diags = diags.Append(fmt.Errorf("Failed to generate diff for %s: %w", path, err))
return diags
}
w.Write(diff)