Don't parse windows commandlines in debugger launch (#30586)

Release Notes:

- N/A
This commit is contained in:
Julia Ryan 2025-05-12 22:43:11 -07:00 committed by GitHub
parent e5d497ee08
commit c6e69fae17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -736,6 +736,14 @@ impl CustomMode {
pub(super) fn debug_request(&self, cx: &App) -> task::LaunchRequest {
let path = self.cwd.read(cx).text(cx);
if cfg!(windows) {
return task::LaunchRequest {
program: self.program.read(cx).text(cx),
cwd: path.is_empty().not().then(|| PathBuf::from(path)),
args: Default::default(),
env: Default::default(),
};
}
let command = self.program.read(cx).text(cx);
let mut args = shlex::split(&command).into_iter().flatten().peekable();
let mut env = FxHashMap::default();