cmds/bootstrap: return the correct error on failure

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen 2019-02-18 19:23:44 -08:00
parent ef94a43e8a
commit cf418cd2db
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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" '