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.
macos-click-through
Fred Sundvik 3 years ago
parent 7d19cd5ebe
commit 0849151838

@ -37,12 +37,8 @@ fn build_nvim_cmd_with_args(bin: &str) -> Command {
#[cfg(windows)] #[cfg(windows)]
if SETTINGS.get::<CmdLineSettings>().wsl { if SETTINGS.get::<CmdLineSettings>().wsl {
let mut cmd = Command::new("wsl"); let mut cmd = Command::new("wsl");
cmd.args(&[ let argstring = format!("{} {}", bin.trim(), args.join(" "));
bin.trim(), cmd.args(&["$SHELL", "-lc", &argstring]);
"-c",
"let \\$PATH=system(\"\\$SHELL -lic 'echo \\$PATH' 2>/dev/null\")",
]);
cmd.args(args);
return cmd; return cmd;
} }
let mut cmd = Command::new(bin); let mut cmd = Command::new(bin);

Loading…
Cancel
Save