Skip to content

Commit f8ba7c0

Browse files
Merge pull request #3592 from ipfs/kevina/publish-parse-path
"ipfs name publish": use path.ParsePath instead of casting input
2 parents 3faf897 + 6657b83 commit f8ba7c0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/commands/publish.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ Publish an <ipfs-path> to another public key (not implemented):
117117
return
118118
}
119119

120-
output, err := publish(ctx, n, k, path.Path(pstr), popts)
120+
pth, err := path.ParsePath(pstr)
121+
if err != nil {
122+
res.SetError(err, cmds.ErrNormal)
123+
return
124+
}
125+
126+
output, err := publish(ctx, n, k, pth, popts)
121127
if err != nil {
122128
res.SetError(err, cmds.ErrNormal)
123129
return

0 commit comments

Comments
 (0)