fix: respect --release
when running cargo all
This commit is contained in:
parent
8b6ec2b607
commit
b8b688f9d8
1 changed files with 6 additions and 4 deletions
10
src/main.rs
10
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue