Skip to content

Commit 95b5ec8

Browse files
author
keks
committed
fixes
License: MIT Signed-off-by: keks <[email protected]>
1 parent e07ec90 commit 95b5ec8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

core/commands/filestore.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ The output is:
8686

8787
r, ok := v.(*filestore.ListRes)
8888
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))
9290
}
9391

9492
if r.ErrorMsg != "" {

core/commands/repo.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package commands
22

33
import (
44
"bytes"
5+
"errors"
56
"fmt"
67
"io"
78
"os"
@@ -99,7 +100,7 @@ order to reclaim hard disk space.
99100
}
100101
}
101102
if errs {
102-
outChan <- &GcResult{Error: "encountered errors during gc run"}
103+
res.SetError(errors.New("encountered errors during gc run"), cmdkit.ErrNormal)
103104
}
104105
} else {
105106
err := corerepo.CollectResult(req.Context(), gcOutChan, func(k cid.Cid) {

0 commit comments

Comments
 (0)