Skip to content

Commit

Permalink
Merge pull request #111 from esp-rs/fix/windows-exports
Browse files Browse the repository at this point in the history
Fix Windows exports
  • Loading branch information
SergioGasquez committed Dec 23, 2022
2 parents 736627d + edb43de commit 299494e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ fn export_environment(export_file: &PathBuf, exports: &[String]) -> Result<(), E
info!("{} Creating export file", emoji::WRENCH);
let mut file = File::create(export_file)?;
for e in exports.iter() {
#[cfg(windows)]
let e = e.replace('/', r#"\"#);
file.write_all(e.as_bytes())?;
file.write_all(b"\n")?;
}
Expand Down
2 changes: 1 addition & 1 deletion src/toolchain/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl Installable for Gcc {
#[cfg(windows)]
exports.push(format!("$Env:PATH += \";{}\"", &self.get_bin_path()));
#[cfg(unix)]
exports.push(format!("export PATH={}:$PATH", &self.get_bin_path()));
exports.push(format!("export PATH=\"{}:$PATH\"", &self.get_bin_path()));

Ok(exports)
}
Expand Down

0 comments on commit 299494e

Please sign in to comment.