diff --git a/butane_cli/src/main.rs b/butane_cli/src/main.rs index e90b98c1..a9bbe89b 100644 --- a/butane_cli/src/main.rs +++ b/butane_cli/src/main.rs @@ -15,6 +15,7 @@ fn main() { .version(env!("CARGO_PKG_VERSION")) .author("James Oakley ") .about("Manages butane database migrations") + .subcommand_required(true) .max_term_width(80) .arg( Arg::new("path").short('p').long("path") @@ -121,8 +122,7 @@ fn main() { _ => eprintln!("Unknown delete command. Try: delete table"), }, Some(("clean", _)) => handle_error(clean(&base_dir)), - Some((cmd, _)) => eprintln!("Unknown command {cmd}"), - None => eprintln!("Unknown command"), + Some((_, _)) | None => panic!("Unreachable as clap handles this automatically"), } }