diff options
author | Daniel Mueller <deso@posteo.net> | 2020-01-24 20:36:34 -0800 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2020-01-24 20:36:34 -0800 |
commit | 61b5aff7be250387ce8510138cae773ed3bd6577 (patch) | |
tree | 2ab4e1bd660651dda6ef4c8af3c6ccf037c93a3d /src/args.rs | |
parent | 86401187fc26b6f3a41cbd4cec463c4ffe50c32c (diff) | |
download | nitrocli-61b5aff7be250387ce8510138cae773ed3bd6577.tar.gz nitrocli-61b5aff7be250387ce8510138cae773ed3bd6577.tar.bz2 |
Provide correct mutual exclusion between config set -o and -O options
The -o/--otp-pin and -O/--no-otp-pin options to the config set command
are supposed to be mutually exclusive, with wrong usage detected by
structopt.
That is not the case currently, however, because the argument to
structopt's conflicts_with attribute is supposed to be the resulting
option and not the name of the variable capturing the result.
This change fixes the problem by changing the string accordingly.
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/args.rs b/src/args.rs index 91bddc5..57e9743 100644 --- a/src/args.rs +++ b/src/args.rs @@ -172,7 +172,7 @@ struct ConfigSetArgs { #[structopt(short = "o", long)] otp_pin: bool, /// Allows one-time password generation without PIN - #[structopt(short = "O", long, conflicts_with("otp_pin"))] + #[structopt(short = "O", long, conflicts_with("otp-pin"))] no_otp_pin: bool, } |