diff --git a/src/main.rs b/src/main.rs index 45701ab..95c690f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,10 +10,12 @@ fn main() { .map(|day| { let day = format!("{:02}", day); - let cmd = Command::new("cargo") - .args(["run", "--release", "--bin", &day]) - .output() - .unwrap(); + let mut args = vec!["run", "--bin", &day]; + if cfg!(not(debug_assertions)) { + args.push("--release"); + } + + let cmd = Command::new("cargo").args(&args).output().unwrap(); println!("----------"); println!("{}| Day {} |{}", ANSI_BOLD, day, ANSI_RESET);