feat(cmd): made error messaging closer to coreutils
This commit is contained in:
parent
221d4cd921
commit
60d74e5ec1
4 changed files with 62 additions and 27 deletions
|
|
@ -71,7 +71,7 @@ func mv(cmd *cobra.Command, args []string) error {
|
|||
if _, err := tx.Get(k); err == nil {
|
||||
return fmt.Errorf("cannot move '%s': '%s' already exists > run with --force to overwrite", fromKey, toKey)
|
||||
} else if err != badger.ErrKeyNotFound {
|
||||
return err
|
||||
return fmt.Errorf("cannot move '%s': %v", fromKey, err)
|
||||
}
|
||||
}
|
||||
entry := badger.NewEntry(k, srcVal).WithMeta(srcMeta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue