cmd/utils: make --ipcdisable and --ipcpath mutually exclusive

This commit is contained in:
Felix Lange 2017-04-12 02:10:20 +02:00
parent 48339d4ef6
commit 0f0d0636a7

View file

@ -585,6 +585,7 @@ func setWS(ctx *cli.Context, cfg *node.Config) {
// setIPC creates an IPC path configuration from the set command line flags, // setIPC creates an IPC path configuration from the set command line flags,
// returning an empty string if IPC was explicitly disabled, or the set path. // returning an empty string if IPC was explicitly disabled, or the set path.
func setIPC(ctx *cli.Context, cfg *node.Config) { func setIPC(ctx *cli.Context, cfg *node.Config) {
checkExclusive(ctx, IPCDisabledFlag, IPCPathFlag)
switch { switch {
case ctx.GlobalBool(IPCDisabledFlag.Name): case ctx.GlobalBool(IPCDisabledFlag.Name):
cfg.IPCPath = "" cfg.IPCPath = ""