diff --git a/src/cli.rs b/src/cli.rs index 7f4e6b2..dc74523 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,7 +1,7 @@ use std::path::MAIN_SEPARATOR; use std::process::Command; -use clap::{App, Arg}; +use clap::{App, Arg, Error}; #[derive(Debug)] pub struct Args { @@ -132,6 +132,12 @@ pub fn get_args() -> Args { 1000 }; + if signal.is_some() && args.is_present("postpone") { + // TODO: Error::argument_conflict() might be the better fit, usage was unclear, though + Error::value_validation_auto(format!("--postpone and --signal are mutually exclusive")) + .exit(); + } + Args { cmd: cmd, paths: paths,