fixes
License: MIT Signed-off-by: keks <keks@cryptoscope.co>
keks committed
Sep 19, 2018 at 12:52 UTC
caf855b4ece05809b576c08c368398424c14e91d
2 files changed
+3
-4
core/commands/filestore.go
+1
-3
@@ -86,9 +86,7 @@ The output is:
86
87
r, ok := v.(*filestore.ListRes)
88
if !ok {
89
- // TODO or just return that error? why didn't we do that before?
90
- log.Error(e.New(e.TypeErr(r, v)))
91
- break
89
+ return e.New(e.TypeErr(r, v))
90
}
91
92
if r.ErrorMsg != "" {
core/commands/repo.go
+2
-1
@@ -2,6 +2,7 @@ package commands
2
3
import (
4
"bytes"
5
+ "errors"
6
"fmt"
7
"io"
8
"os"
@@ -99,7 +100,7 @@ order to reclaim hard disk space.
100
}
101
}
102
if errs {
102
- outChan <- &GcResult{Error: "encountered errors during gc run"}
103
+ res.SetError(errors.New("encountered errors during gc run"), cmdkit.ErrNormal)
104
}
105
} else {
106
err := corerepo.CollectResult(req.Context(), gcOutChan, func(k cid.Cid) {