fix: compatibility with aoc-cli^0.4.0 (#7)
Co-authored-by: Peter Anning <22272449+peteanning@users.noreply.github.com>
This commit is contained in:
parent
840d617dde
commit
132fb662de
1 changed files with 11 additions and 9 deletions
|
@ -56,21 +56,23 @@ fn main() {
|
|||
exit_with_status(1, &tmp_file_path);
|
||||
}
|
||||
|
||||
println!("Downloading input via aoc-cli...");
|
||||
|
||||
let mut cmd_args = vec![
|
||||
"download".into(),
|
||||
"--file".into(),
|
||||
tmp_file_path.to_string_lossy().to_string(),
|
||||
"--day".into(),
|
||||
args.day.to_string(),
|
||||
];
|
||||
let mut cmd_args = vec![];
|
||||
|
||||
if let Some(year) = args.year {
|
||||
cmd_args.push("--year".into());
|
||||
cmd_args.push(year.to_string());
|
||||
}
|
||||
|
||||
cmd_args.append(&mut vec![
|
||||
"--file".into(),
|
||||
tmp_file_path.to_string_lossy().to_string(),
|
||||
"--day".into(),
|
||||
args.day.to_string(),
|
||||
"download".into(),
|
||||
]);
|
||||
|
||||
println!("Downloading input with >aoc {}", cmd_args.join(" "));
|
||||
|
||||
match Command::new("aoc").args(cmd_args).output() {
|
||||
Ok(cmd_output) => {
|
||||
io::stdout()
|
||||
|
|
Loading…
Add table
Reference in a new issue