From b4af61edfe43ca17fdc973b3bcdccb4263d12105 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 29 May 2025 12:19:23 +0300 Subject: [PATCH] Revert "task: Wrap programs in ""s (#31537)" (#31674) That commit broke a lot, as our one-off tasks (alt-enter in the tasks modal), npm, jest tasks are all not real commands, but a composition of commands and arguments. This reverts commit 5db14d315b0822c6d261c0853a3ea039877fd8a8. Closes https://github.com/zed-industries/zed/issues/31554 Release Notes: - N/A Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> --- crates/languages/src/python.rs | 5 ++++- crates/task/src/lib.rs | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/languages/src/python.rs b/crates/languages/src/python.rs index ea0e348c10..fcd0ddcab1 100644 --- a/crates/languages/src/python.rs +++ b/crates/languages/src/python.rs @@ -382,7 +382,10 @@ impl ContextProvider for PythonContextProvider { toolchains .active_toolchain(worktree_id, Arc::from("".as_ref()), "Python".into(), cx) .await - .map_or_else(|| "python3".to_owned(), |toolchain| toolchain.path.into()) + .map_or_else( + || "python3".to_owned(), + |toolchain| format!("\"{}\"", toolchain.path), + ) } else { String::from("python3") }; diff --git a/crates/task/src/lib.rs b/crates/task/src/lib.rs index 30605c7d9b..a6bf613909 100644 --- a/crates/task/src/lib.rs +++ b/crates/task/src/lib.rs @@ -384,7 +384,6 @@ impl ShellBuilder { /// Returns the program and arguments to run this task in a shell. pub fn build(mut self, task_command: String, task_args: &Vec) -> (String, Vec) { - let task_command = format!("\"{task_command}\""); let combined_command = task_args .into_iter() .fold(task_command, |mut command, arg| {