diff --git a/src/build/app/mod.rs b/src/build/app/mod.rs index 3801cd28ce9f..49ea7be38701 100644 --- a/src/build/app/mod.rs +++ b/src/build/app/mod.rs @@ -2182,7 +2182,7 @@ impl<'help> App<'help> { if self.settings.is_set(AppSettings::Multicall) { if let Some((argv0, _)) = it.next() { let argv0 = Path::new(&argv0); - if let Some(command) = argv0.file_name().and_then(|f| f.to_str()) { + if let Some(command) = argv0.file_stem().and_then(|f| f.to_str()) { // Stop borrowing command so we can get another mut ref to it. let command = command.to_owned(); debug!(