Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
terminal: Check for script existence properly before activating it (#23476)
Piotr Osiewicz11bb90652083
diff --git a/crates/project/src/terminals.rs b/crates/project/src/terminals.rsindex caad9eadc47..3d8db4a3689 100644--- a/crates/project/src/terminals.rs+++ b/crates/project/src/terminals.rs@@ -490,9 +490,10 @@ impl Project {"windows" => "\r",_ => "\n",};- if smol::block_on(self.fs.metadata(path.as_ref())).is_err() {- return None;- }+ smol::block_on(self.fs.metadata(path.as_ref()))+ .ok()+ .flatten()?;+Some(format!("{} {} ; clear{}",activate_keyword, quoted, line_ending