diff --git a/crates/languages/src/python.rs b/crates/languages/src/python.rs index e68c43d805..29b376bd98 100644 --- a/crates/languages/src/python.rs +++ b/crates/languages/src/python.rs @@ -382,10 +382,7 @@ impl ContextProvider for PythonContextProvider { toolchains .active_toolchain(worktree_id, Arc::from("".as_ref()), "Python".into(), cx) .await - .map_or_else( - || "python3".to_owned(), - |toolchain| format!("\"{}\"", toolchain.path), - ) + .map_or_else(|| "python3".to_owned(), |toolchain| toolchain.path.into()) } else { String::from("python3") }; diff --git a/crates/task/src/lib.rs b/crates/task/src/lib.rs index a6bf613909..30605c7d9b 100644 --- a/crates/task/src/lib.rs +++ b/crates/task/src/lib.rs @@ -384,6 +384,7 @@ 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| {