diff --git a/src/main.rs b/src/main.rs
@@ -108,8 +108,8 @@ macro_rules! usage_config {
fn main() -> ExitCode {
let args: Vec<String> = env::args().collect();
- let config = match &args[..] {
- [_, config] => config,
+ let (program, config) = match &args[..] {
+ [program, config] => (program, config),
[program] => {
error!("Expected 1 command line argument, found none";
newline = false);
@@ -131,7 +131,8 @@ fn main() -> ExitCode {
Err(err) => {
error!("Couldn't open {config:?}: {err}",
config = config, err = err; newline = false);
- ExitCode::FAILURE
+ usage!(program);
+ ExitCode::FAILURE
}
// Error parsing the config file
Ok(Err(err)) => {