From 9c8328e386591250a0f762da577ab17410997eb1 Mon Sep 17 00:00:00 2001 From: thesayyn Date: Fri, 3 Nov 2023 11:47:53 -0700 Subject: [PATCH] handle error --- cmd/gomtree/cmd/mutate.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }