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 Jun 4, 2018
1 parent 2b6e4d3 commit 5ef87c2
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 5ef87c2

Please sign in to comment.