mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
cmds/bootstrap: return the correct error on failure
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
parent
ef94a43e8a
commit
cf418cd2db
@ -212,7 +212,7 @@ var bootstrapRemoveCmd = &cmds.Command{
|
||||
|
||||
input, perr := config.ParseBootstrapPeers(req.Arguments)
|
||||
if perr != nil {
|
||||
return err
|
||||
return perr
|
||||
}
|
||||
|
||||
removed, err = bootstrapRemove(r, cfg, input)
|
||||
|
||||
@ -83,6 +83,10 @@ test_bootstrap_cmd() {
|
||||
test_cmp rm_expected rm_actual
|
||||
'
|
||||
|
||||
test_expect_success "'ipfs bootstrap rm' fails on bad peers" '
|
||||
test_expect_code 1 ipfs bootstrap rm "foo/bar"
|
||||
'
|
||||
|
||||
test_bootstrap_list_cmd $BP2
|
||||
|
||||
test_expect_success "'ipfs bootstrap add --default' succeeds" '
|
||||
|
||||
Loading…
Reference in New Issue
Block a user