@cryptotaxi247 / kubo / commits / 39513c6e7

commands(feat): log when invoking deprecated urlstore command

License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed Apr 26, 2019 at 10:45 UTC 39513c6e7239dee65152cbdb57c8091060005f49
1 file changed +3 -1
core/commands/urlstore.go
+3 -1
@@ -27,7 +27,7 @@ var urlAdd = &cmds.Command{
27 Helptext: cmdkit.HelpText{
28 Tagline: "Add URL via urlstore.",
29 LongDescription: `
30 -DEPRECATED: Use 'ipfs add --nocopy URL'.
30 +DEPRECATED: Use 'ipfs add --nocopy --cid-version=1 URL'.
31
32 Add URLs to ipfs without storing the data locally.
33
@@ -48,6 +48,8 @@ settings for 'ipfs add'.
48 Type: &BlockStat{},
49
50 Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
51 + log.Error("The 'ipfs urlstore' command is deprecated, please use 'ipfs add --nocopy --cid-version=1")
52 +
53 urlString := req.Arguments[0]
54 if !filestore.IsURL(req.Arguments[0]) {
55 return fmt.Errorf("unsupported url syntax: %s", urlString)