提交 39513c6e 作者: Steven Allen

commands(feat): log when invoking deprecated urlstore command

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 d140a689
...@@ -27,7 +27,7 @@ var urlAdd = &cmds.Command{ ...@@ -27,7 +27,7 @@ var urlAdd = &cmds.Command{
Helptext: cmdkit.HelpText{ Helptext: cmdkit.HelpText{
Tagline: "Add URL via urlstore.", Tagline: "Add URL via urlstore.",
LongDescription: ` LongDescription: `
DEPRECATED: Use 'ipfs add --nocopy URL'. DEPRECATED: Use 'ipfs add --nocopy --cid-version=1 URL'.
Add URLs to ipfs without storing the data locally. Add URLs to ipfs without storing the data locally.
...@@ -48,6 +48,8 @@ settings for 'ipfs add'. ...@@ -48,6 +48,8 @@ settings for 'ipfs add'.
Type: &BlockStat{}, Type: &BlockStat{},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
log.Error("The 'ipfs urlstore' command is deprecated, please use 'ipfs add --nocopy --cid-version=1")
urlString := req.Arguments[0] urlString := req.Arguments[0]
if !filestore.IsURL(req.Arguments[0]) { if !filestore.IsURL(req.Arguments[0]) {
return fmt.Errorf("unsupported url syntax: %s", urlString) return fmt.Errorf("unsupported url syntax: %s", urlString)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论