terminal: Check for script existence properly before activating it (#23476)
We were not covering a variant where the returned metadata was Ok(None) Closes #ISSUE Release Notes: - Fixed venv activation script path showing up in terminal for non-existant scripts.
This commit is contained in:
parent
91b0ca0895
commit
11bb906520
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue