Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add double quote wrap in activate_python_virtual_environment (#7787)

Leon54f82eb16693
diff --git a/crates/project/src/terminals.rs b/crates/project/src/terminals.rs
index e125af052d7..5109f9e1266 100644
--- a/crates/project/src/terminals.rs
+++ b/crates/project/src/terminals.rs
@@ -124,7 +124,10 @@ impl Project {
// Paths are not strings so we need to jump through some hoops to format the command without `format!`
let mut command = Vec::from(activate_command.as_bytes());
command.push(b' ');
+ // Wrapping path in double quotes to catch spaces in folder name
+ command.extend_from_slice(b"\"");
command.extend_from_slice(activate_script.as_os_str().as_encoded_bytes());
+ command.extend_from_slice(b"\"");
command.push(b'\n');
terminal_handle.update(cx, |this, _| this.input_bytes(command));