From a28d38b05fed847e3bba6c504867758678e2139b Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Fri, 3 Dec 2021 20:40:31 +1300 Subject: [PATCH] Try some fixes for external paths (#415) --- crates/nu-command/src/system/run_external.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/nu-command/src/system/run_external.rs b/crates/nu-command/src/system/run_external.rs index 1e84d67cc7..4e117dddc7 100644 --- a/crates/nu-command/src/system/run_external.rs +++ b/crates/nu-command/src/system/run_external.rs @@ -227,6 +227,10 @@ impl ExternalCommand { for arg in &self.args { let arg = trim_enclosing_quotes(arg); + let arg = nu_path::expand_path(arg).to_string_lossy().to_string(); + + let arg = arg.replace("\\", "\\\\"); + process.arg(&arg); }