client: use StructOpt's conflicts_with

pull/54/head
Jake McGinty 2021-04-12 00:34:56 +09:00
parent cb0e76c39b
commit 142553a9cc
1 changed files with 3 additions and 3 deletions

View File

@ -33,11 +33,11 @@ struct Opt {
#[derive(Debug, StructOpt)] #[derive(Debug, StructOpt)]
struct HostsOpt { struct HostsOpt {
/// The path to write hosts to. /// The path to write hosts to.
#[structopt(long, default_value = "/etc/hosts")] #[structopt(long = "hosts-path", default_value = "/etc/hosts")]
hosts_path: PathBuf, hosts_path: PathBuf,
/// Don't write to any hosts files. This takes precedence over --hosts-path. /// Don't write to any hosts files.
#[structopt(long)] #[structopt(long = "no-write-hosts", conflicts_with = "hosts-path")]
no_write_hosts: bool, no_write_hosts: bool,
} }