Skip to content

Commit 5676eb5

Browse files
committed
cmds: improve help/errors for allow-offline
Better explain what's happening and why. License: MIT Signed-off-by: Steven Allen <[email protected]>
1 parent 9a53494 commit 5676eb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/commands/name/publish.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
)
2121

2222
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")
2424
errIpnsMount = errors.New("cannot manually publish while IPNS is mounted")
2525
errIdentityLoad = errors.New("identity not loaded")
2626
)
@@ -83,7 +83,7 @@ Alternatively, publish an <ipfs-path> using a valid PeerID (as listed by
8383
`Time duration that the record will be valid for. <<default>>
8484
This accepts durations such as "300s", "1.5h" or "2h45m". Valid time units are
8585
"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."),
8787
cmdkit.StringOption(ttlOptionName, "Time duration this record should be cached for (caution: experimental)."),
8888
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"),
8989
},

0 commit comments

Comments
 (0)