diff --git a/download/tests/read-proxy-env.rs b/download/tests/read-proxy-env.rs index 8a9f978aac..c52552b772 100644 --- a/download/tests/read-proxy-env.rs +++ b/download/tests/read-proxy-env.rs @@ -72,8 +72,12 @@ async fn socks_proxy_request() { if let Err(e) = res { let s = e.source().unwrap(); + assert!( + s.to_string().contains("socks connect error"), + "Expected socks connect error, got: {}", + s.to_string() + ); assert_eq!(CALL_COUNT.load(Ordering::SeqCst), 1); - assert!(s.to_string().contains("socks connect error")); } else { panic!("Socks proxy was ignored") } diff --git a/src/bin/rustup-init.rs b/src/bin/rustup-init.rs index 8f86e68733..5971d7f3d0 100644 --- a/src/bin/rustup-init.rs +++ b/src/bin/rustup-init.rs @@ -117,7 +117,7 @@ async fn run_rustup_inner() -> Result { // name. Browsers rename duplicates to // e.g. rustup-setup(2), and this allows all variations // to work. - setup_mode::main() + setup_mode::main().await } Some(n) if n.starts_with("rustup-gc-") => { // This is the final uninstallation stage on windows where diff --git a/src/cli/setup_mode.rs b/src/cli/setup_mode.rs index fc962c96df..41fdfec9a9 100644 --- a/src/cli/setup_mode.rs +++ b/src/cli/setup_mode.rs @@ -14,7 +14,7 @@ use crate::{ }; #[cfg_attr(feature = "otel", tracing::instrument)] -pub fn main() -> Result { +pub async fn main() -> Result { let args: Vec<_> = process().args().collect(); let arg1 = args.get(1).map(|a| &**a); @@ -157,5 +157,5 @@ pub fn main() -> Result { warn!("{}", common::WARN_COMPLETE_PROFILE); } - utils::run_future(self_update::install(no_prompt, verbose, quiet, opts)) + self_update::install(no_prompt, verbose, quiet, opts).await }