diff --git a/lib/cli/src/cli.rs b/lib/cli/src/cli.rs index fcc3bd9ae67..134cf3cbf08 100644 --- a/lib/cli/src/cli.rs +++ b/lib/cli/src/cli.rs @@ -36,7 +36,12 @@ fn wasmer_main_inner() -> Result<(), anyhow::Error> { args.execute() } Err(e) => { - if e.kind() == clap::error::ErrorKind::InvalidSubcommand { + let might_be_wasmer_run = matches!( + e.kind(), + clap::error::ErrorKind::InvalidSubcommand | clap::error::ErrorKind::UnknownArgument + ); + + if might_be_wasmer_run { if let Ok(run) = Run::try_parse() { // Try to parse the command using the `wasmer some/package` // shorthand. Note that this has discoverability issues