diff --git a/cmd/gomtree/cmd/mutate.go b/cmd/gomtree/cmd/mutate.go index 7d858ce..92f35e0 100644 --- a/cmd/gomtree/cmd/mutate.go +++ b/cmd/gomtree/cmd/mutate.go @@ -117,7 +117,10 @@ skip: } } - spec.WriteTo(writer) + _, err = spec.WriteTo(writer) + if err != nil { + return fmt.Errorf("writing mtree %s: %w", outputPath, err) + } return nil }