From 202dcb122f719036590f05430b2bac73cdfa5b07 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Thu, 18 Sep 2025 08:10:33 -0400 Subject: [PATCH] remote: Remove excess quoting in WSL `build_command` (#38380) The built-up command for the WSL remote connection looks like ``` wsl.exe --distribution Ubuntu --user cole --cd /home/cole -- bash -c SCRIPT ``` Where `SCRIPT` is a command itself. We don't need extra quotes around `SCRIPT` because we already pass it whole as a separate argument to `wsl.exe`. This isn't yet enough to get ACP servers working in WSL projects (#38332), but it removes one roadblock. Release Notes: - windows: Fixed an issue that could prevent running binaries in WSL remote projects. --- crates/remote/src/transport/wsl.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/remote/src/transport/wsl.rs b/crates/remote/src/transport/wsl.rs index 6b386ee361c763e30c9e31c15b47c836ef922dae..160a953129ebd82c357ecbfbb48b3d875f196c3d 100644 --- a/crates/remote/src/transport/wsl.rs +++ b/crates/remote/src/transport/wsl.rs @@ -400,7 +400,7 @@ impl RemoteConnection for WslRemoteConnection { "--".to_string(), self.shell.clone(), "-c".to_string(), - shlex::try_quote(&script)?.to_string(), + script, ] } else { vec![ @@ -411,7 +411,7 @@ impl RemoteConnection for WslRemoteConnection { "--".to_string(), self.shell.clone(), "-c".to_string(), - shlex::try_quote(&script)?.to_string(), + script, ] };