cmds: improve help/errors for allow-offline
Better explain what's happening and why. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Sep 19, 2018 at 00:25 UTC
5676eb530b95b8db9fb292371238cab8977c0d6f
1 file changed
+2
-2
core/commands/name/publish.go
+2
-2
@@ -20,7 +20,7 @@ import (
20
)
21
22
var (
23
- errAllowOffline = errors.New("cannot publish in offline mode by default,using `--allow-offline` to publish again")
23
+ errAllowOffline = errors.New("can't publish while offline: pass `--allow-offline` to override")
24
errIpnsMount = errors.New("cannot manually publish while IPNS is mounted")
25
errIdentityLoad = errors.New("identity not loaded")
26
)
@@ -83,7 +83,7 @@ Alternatively, publish an <ipfs-path> using a valid PeerID (as listed by
83
`Time duration that the record will be valid for. <<default>>
84
This accepts durations such as "300s", "1.5h" or "2h45m". Valid time units are
85
"ns", "us" (or "µs"), "ms", "s", "m", "h".`).WithDefault("24h"),
86
- cmdkit.BoolOption(allowOfflineOptionName, "Allow publish in offline mode"),
86
+ cmdkit.BoolOption(allowOfflineOptionName, "When offline, save the IPNS record to the the local datastore without broadcasting to the network instead of simply failing."),
87
cmdkit.StringOption(ttlOptionName, "Time duration this record should be cached for (caution: experimental)."),
88
cmdkit.StringOption(keyOptionName, "k", "Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'. Default: <<default>>.").WithDefault("self"),
89
},