Skip to content

Commit

Permalink
repo rm-root: force the correct usage of "--remove-local-root"
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
  • Loading branch information
kevina committed May 31, 2018
1 parent d917bb7 commit ec87ec7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ This command can only run when the ipfs daemon is not running.
if have && !removeLocalRoot {
res.SetError(fmt.Errorf("root %s exists locally. Are you sure you want to unlink this? Pass --remove-local-root to continue", cidStr), cmdkit.ErrNormal)
return
} else if !have && removeLocalRoot {
res.SetError(fmt.Errorf("root does not %s exists locally. Please remove --remove-local-root to continue", cidStr), cmdkit.ErrNormal)
return
}

err = repo.Datastore().Delete(dsk)
Expand Down

0 comments on commit ec87ec7

Please sign in to comment.