From 30cf198ce2c821b1c236f9fda1a4ab72bdba59af Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Fri, 23 Dec 2022 12:04:57 +0100 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=F0=9F=8E=A8=20Avod=20mixing=20/=20a?= =?UTF-8?q?nd=20\=20in=20Windows=20exports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 6069a6a..931cc6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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")?; } From edb43de2d9b9badfdc5399bc33f6efcebc5086dc Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Fri, 23 Dec 2022 11:10:33 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=F0=9F=8E=A8=20Store=20GCC=20export?= =?UTF-8?q?=20paths=20between=20quotes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/toolchain/gcc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toolchain/gcc.rs b/src/toolchain/gcc.rs index bc11b04..0cdcd1e 100644 --- a/src/toolchain/gcc.rs +++ b/src/toolchain/gcc.rs @@ -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) }