From fd1f197468cc1dc3beac554f7a2e8e2dda779d78 Mon Sep 17 00:00:00 2001 From: Jeffrey Frey Date: Tue, 29 Nov 2022 15:09:14 -0500 Subject: [PATCH] Update util.go --- internal/pkg/util/util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/pkg/util/util.go b/internal/pkg/util/util.go index ab2d67cc..ce4dc49c 100644 --- a/internal/pkg/util/util.go +++ b/internal/pkg/util/util.go @@ -615,7 +615,8 @@ func FileGz( outStr := string(out[:]) if err != nil && strings.HasSuffix(compressor, "gzip") && strings.Contains(outStr, "unrecognized option") { var gzippedFile *os.File - + var gzipStderr io.ReadCloser + /* Older version of gzip, try it another way: */ wwlog.Verbose("%s does not recognize the --keep flag, trying piped stdout", compressor) @@ -633,7 +634,7 @@ func FileGz( "--stdout", file ) proc.Stdout = gzippedFile - gzipStderr, err := proc.StderrPipe() + gzipStderr, err = proc.StderrPipe() if err != nil { return errors.Wrapf(err, "Unable to open stderr pipe for compression program: %s", compressor) }