Skip to content

Commit 256ad27

Browse files
Merge pull request #5218 from schomatis/fix/cmds-files-cp/err-msg
commands/files: add error messages for `cp` paths
2 parents a44bffb + 4334dde commit 256ad27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/commands/files.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,13 @@ var filesCpCmd = &oldcmds.Command{
329329

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

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

0 commit comments

Comments
 (0)