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",
|
"windows" => "\r",
|
||||||
_ => "\n",
|
_ => "\n",
|
||||||
};
|
};
|
||||||
if smol::block_on(self.fs.metadata(path.as_ref())).is_err() {
|
smol::block_on(self.fs.metadata(path.as_ref()))
|
||||||
return None;
|
.ok()
|
||||||
}
|
.flatten()?;
|
||||||
|
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"{} {} ; clear{}",
|
"{} {} ; clear{}",
|
||||||
activate_keyword, quoted, line_ending
|
activate_keyword, quoted, line_ending
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue