diff --git a/src/main.rs b/src/main.rs index 10a3ade..ec19823 100755 --- a/src/main.rs +++ b/src/main.rs @@ -61,10 +61,10 @@ fn main() { .help("Excludes packages from given operation"), ) .arg( - Arg::with_name("regen") - .short("r") - .long("regen") - .help("Regenerates repository after building give package(s)"), + Arg::with_name("no-regen") + .short("n") + .long("no-regen") + .help("Does not regenerate repository after building given package(s)"), ), ) .subcommand( diff --git a/src/operations/build.rs b/src/operations/build.rs index 50f21f0..af3b32f 100644 --- a/src/operations/build.rs +++ b/src/operations/build.rs @@ -68,10 +68,10 @@ pub fn build(matches: &ArgMatches) { generate(); } - if matches + if !matches .subcommand_matches("build") .unwrap() - .is_present("regen") + .is_present("no-regen") { repository::generate(); }