From 0849151838ee73dad99362e4f17fa3a7a70a4ee3 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 25 Nov 2021 19:39:50 +0200 Subject: [PATCH] Run neovim directly in WSL login shell Therefore, the neovim path hack is no longer needed, since the path and other environment variables are now set correctly. --- src/bridge/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/bridge/mod.rs b/src/bridge/mod.rs index 688714a..75e75d2 100644 --- a/src/bridge/mod.rs +++ b/src/bridge/mod.rs @@ -37,12 +37,8 @@ fn build_nvim_cmd_with_args(bin: &str) -> Command { #[cfg(windows)] if SETTINGS.get::().wsl { let mut cmd = Command::new("wsl"); - cmd.args(&[ - bin.trim(), - "-c", - "let \\$PATH=system(\"\\$SHELL -lic 'echo \\$PATH' 2>/dev/null\")", - ]); - cmd.args(args); + let argstring = format!("{} {}", bin.trim(), args.join(" ")); + cmd.args(&["$SHELL", "-lc", &argstring]); return cmd; } let mut cmd = Command::new(bin);