Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen-CH-Leung committed Oct 21, 2024
1 parent 4b67e92 commit 0be8c05
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,10 +1179,8 @@ impl BuildContext {
#[cfg(windows)]
{
Command::new("cmd")
.args(&["/C", tf.path().to_str().unwrap()])
.args("-y")
.arg("--default-toolchain")
.arg("none")
.args(["/C", tf.path().to_str().unwrap()])
.args(vec!["-y", "--default-toolchain", "none"])
.env("RUSTUP_HOME", rustup_home)
.env("CARGO_HOME", cargo_home)
.status()?;
Expand Down Expand Up @@ -1220,8 +1218,8 @@ impl BuildContext {
let new_path = format!("{};{}", cargo_bin_path, current_path);
env::set_var("PATH", &new_path);
Command::new("cmd")
.args(&["/C", "rustup default stable"])
.status();
.args(vec!["/C", "rustup default stable"])
.status()?;
}

Ok(())
Expand Down

0 comments on commit 0be8c05

Please sign in to comment.