diff --git a/cmd/archive.go b/cmd/archive.go index d17096c0fd8..d39a6780ed1 100644 --- a/cmd/archive.go +++ b/cmd/archive.go @@ -105,7 +105,12 @@ An archive is a fully self-contained test run, and can be executed identically e if err != nil { return err } - return arc.Write(f) + + err = arc.Write(f) + if cerr := f.Close(); err == nil && cerr != nil { + err = cerr + } + return err }, }