python: Check for activate script existence before running it (#22792)
Closes #ISSUE Release Notes: - Python auto-venv activation in terminal now checks for path existence before executing the activate script.
This commit is contained in:
@@ -433,6 +433,9 @@ impl Project {
|
||||
"windows" => "\r",
|
||||
_ => "\n",
|
||||
};
|
||||
if smol::block_on(self.fs.metadata(path.as_ref())).is_err() {
|
||||
return None;
|
||||
}
|
||||
Some(format!(
|
||||
"{} {} ; clear{}",
|
||||
activate_keyword, quoted, line_ending
|
||||
|
||||
Reference in New Issue
Block a user