Fix missed error check.
authorTom Clegg <tom@tomclegg.ca>
Mon, 12 Oct 2020 13:48:41 +0000 (09:48 -0400)
committerTom Clegg <tom@tomclegg.ca>
Mon, 12 Oct 2020 13:48:41 +0000 (09:48 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

stats.go

index 0fcb897afae156aa1952b56ec4909100e5be85c7..62fb17d4fdb2b9dbd7425aeb8faa72f0a3b1654f 100644 (file)
--- a/stats.go
+++ b/stats.go
@@ -101,7 +101,10 @@ func (cmd *stats) RunCommand(prog string, args []string, stdin io.Reader, stdout
        }
 
        bufw := bufio.NewWriter(output)
-       cmd.doStats(input, bufw)
+       err = cmd.doStats(input, bufw)
+       if err != nil {
+               return 1
+       }
        err = bufw.Flush()
        if err != nil {
                return 1