mirror of
https://github.com/esp-rs/espup.git
synced 2025-09-28 13:20:41 +00:00
Merge pull request #111 from esp-rs/fix/windows-exports
Fix Windows exports
This commit is contained in:
commit
299494e913
@ -466,6 +466,8 @@ fn export_environment(export_file: &PathBuf, exports: &[String]) -> Result<(), E
|
|||||||
info!("{} Creating export file", emoji::WRENCH);
|
info!("{} Creating export file", emoji::WRENCH);
|
||||||
let mut file = File::create(export_file)?;
|
let mut file = File::create(export_file)?;
|
||||||
for e in exports.iter() {
|
for e in exports.iter() {
|
||||||
|
#[cfg(windows)]
|
||||||
|
let e = e.replace('/', r#"\"#);
|
||||||
file.write_all(e.as_bytes())?;
|
file.write_all(e.as_bytes())?;
|
||||||
file.write_all(b"\n")?;
|
file.write_all(b"\n")?;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ impl Installable for Gcc {
|
|||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
exports.push(format!("$Env:PATH += \";{}\"", &self.get_bin_path()));
|
exports.push(format!("$Env:PATH += \";{}\"", &self.get_bin_path()));
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
exports.push(format!("export PATH={}:$PATH", &self.get_bin_path()));
|
exports.push(format!("export PATH=\"{}:$PATH\"", &self.get_bin_path()));
|
||||||
|
|
||||||
Ok(exports)
|
Ok(exports)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user