Skip to content

Commit

Permalink
cmds: improve help/errors for allow-offline
Browse files Browse the repository at this point in the history
Better explain what's happening and why.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Sep 19, 2018
1 parent 9a53494 commit 5676eb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/commands/name/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand Down Expand Up @@ -83,7 +83,7 @@ Alternatively, publish an <ipfs-path> using a valid PeerID (as listed by
`Time duration that the record will be valid for. <<default>>
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: <<default>>.").WithDefault("self"),
},
Expand Down

0 comments on commit 5676eb5

Please sign in to comment.