diff --git a/src/bin/cargo/cli.rs b/src/bin/cargo/cli.rs index b73567bff5fe..69a7cf91493c 100644 --- a/src/bin/cargo/cli.rs +++ b/src/bin/cargo/cli.rs @@ -55,14 +55,18 @@ pub fn main(gctx: &mut GlobalContext) -> CliResult { .map(String::as_str) == Some("help") { + config_configure(gctx, &expanded_args, None, global_args, None)?; print_zhelp(gctx); } else if expanded_args.flag("version") { + config_configure(gctx, &expanded_args, None, global_args, None)?; let version = get_version_string(is_verbose); drop_print!(gctx, "{}", version); } else if let Some(code) = expanded_args.get_one::("explain") { + config_configure(gctx, &expanded_args, None, global_args, None)?; let mut procss = gctx.load_global_rustc(None)?.process(); procss.arg("--explain").arg(code).exec()?; } else if expanded_args.flag("list") { + config_configure(gctx, &expanded_args, None, global_args, None)?; print_list(gctx, is_verbose); } else { let (cmd, subcommand_args) = match expanded_args.subcommand() {