Skip to content

Commit

Permalink
Merge pull request #5218 from schomatis/fix/cmds-files-cp/err-msg
Browse files Browse the repository at this point in the history
commands/files: add error messages for `cp` paths
  • Loading branch information
whyrusleeping authored Jul 18, 2018
2 parents a44bffb + 4334dde commit 256ad27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/commands/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ var filesCpCmd = &oldcmds.Command{

nd, err := getNodeFromPath(req.Context(), node, node.DAG, src)
if err != nil {
res.SetError(err, cmdkit.ErrNormal)
res.SetError(fmt.Errorf("cp: cannot get node from path %s: %s", src, err), cmdkit.ErrNormal)
return
}

err = mfs.PutNode(node.FilesRoot, dst, nd)
if err != nil {
res.SetError(err, cmdkit.ErrNormal)
res.SetError(fmt.Errorf("cp: cannot put node in path %s: %s", dst, err), cmdkit.ErrNormal)
return
}

Expand Down

0 comments on commit 256ad27

Please sign in to comment.