Files
AdventOfCode-Rust/src/template/commands/download.rs
Felix Spöttel d7af3dca9e refactor: fix most pedantic clippy warnings
closes #29

Co-authored-by: Andy Pymont <andypymont@gmail.com>
2023-10-31 19:46:31 +01:00

15 lines
390 B
Rust

use crate::template::aoc_cli;
use std::process;
pub fn handle(day: u8) {
if aoc_cli::check().is_err() {
eprintln!("command \"aoc\" not found or not callable. Try running \"cargo install aoc-cli\" to install it.");
process::exit(1);
}
if let Err(e) = aoc_cli::download(day) {
eprintln!("failed to call aoc-cli: {e}");
process::exit(1);
};
}