diff --git a/src/main.rs b/src/main.rs index 1457e937..b053e765 100644 --- a/src/main.rs +++ b/src/main.rs @@ -239,8 +239,8 @@ async fn install(args: InstallOpts) -> Result<()> { } // With a list of applications to install, install them all in parallel. - let (tx, mut rx) = mpsc::channel::, Error>>(32); let installable_items = to_install.len(); + let (tx, mut rx) = mpsc::channel::, Error>>(installable_items); for app in to_install { let tx = tx.clone(); tokio::spawn(async move { diff --git a/src/toolchain/rust.rs b/src/toolchain/rust.rs index ba36574b..9883f372 100644 --- a/src/toolchain/rust.rs +++ b/src/toolchain/rust.rs @@ -202,7 +202,7 @@ impl Installable for XtensaRust { cmd!("/bin/bash", "-c", arguments) .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; download_file( self.src_dist_url.clone(), @@ -220,7 +220,7 @@ impl Installable for XtensaRust { cmd!("/bin/bash", "-c", arguments) .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; } // Some platfroms like Windows are available in single bundle rust + src, because install // script in dist is not available for the plaform. It's sufficient to extract the toolchain @@ -262,7 +262,7 @@ impl Crate { cmd!("cargo", "uninstall", extra_crate, "--quiet") .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; Ok(()) } } @@ -283,7 +283,7 @@ impl Installable for Crate { cmd!("cargo", "install", &self.name, "--quiet") .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; } Ok(vec![]) // No exports @@ -317,7 +317,7 @@ impl RiscVTarget { ) .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; Ok(()) } } @@ -336,7 +336,7 @@ impl Installable for RiscVTarget { ) .into_inner() .stderr(Stdio::null()) - .spawn()?; + .output()?; cmd!( "rustup", "target", @@ -348,7 +348,7 @@ impl Installable for RiscVTarget { ) .into_inner() .stderr(Stdio::null()) - .spawn()?; + .output()?; Ok(vec![]) // No exports } @@ -457,7 +457,7 @@ async fn install_rustup(nightly_version: &str, host_triple: &HostTriple) -> Resu ) .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; #[cfg(not(windows))] cmd!( "/bin/bash", @@ -473,7 +473,7 @@ async fn install_rustup(nightly_version: &str, host_triple: &HostTriple) -> Resu ) .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; #[cfg(windows)] let path = format!( @@ -511,7 +511,7 @@ fn install_rust_nightly(version: &str) -> Result<(), Error> { ) .into_inner() .stdout(Stdio::null()) - .spawn()?; + .output()?; Ok(()) }