From 5676eb530b95b8db9fb292371238cab8977c0d6f Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 19 Sep 2018 00:25:22 +0000 Subject: [PATCH] cmds: improve help/errors for allow-offline Better explain what's happening and why. License: MIT Signed-off-by: Steven Allen --- core/commands/name/publish.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/commands/name/publish.go b/core/commands/name/publish.go index db8941b6f75..c1489baebf5 100644 --- a/core/commands/name/publish.go +++ b/core/commands/name/publish.go @@ -20,7 +20,7 @@ import ( ) var ( - errAllowOffline = errors.New("cannot publish in offline mode by default,using `--allow-offline` to publish again") + errAllowOffline = errors.New("can't publish while offline: pass `--allow-offline` to override") errIpnsMount = errors.New("cannot manually publish while IPNS is mounted") errIdentityLoad = errors.New("identity not loaded") ) @@ -83,7 +83,7 @@ Alternatively, publish an using a valid PeerID (as listed by `Time duration that the record will be valid for. <> This accepts durations such as "300s", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`).WithDefault("24h"), - cmdkit.BoolOption(allowOfflineOptionName, "Allow publish in offline mode"), + cmdkit.BoolOption(allowOfflineOptionName, "When offline, save the IPNS record to the the local datastore without broadcasting to the network instead of simply failing."), cmdkit.StringOption(ttlOptionName, "Time duration this record should be cached for (caution: experimental)."), cmdkit.StringOption(keyOptionName, "k", "Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'. Default: <>.").WithDefault("self"), },