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:
parent
9d5ae516fd
commit
7a66c764b4
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue