mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-93858: Prevent error when activating venv in nested fish instances (GH-93931)
This commit is contained in:
parent
e5e51556e4
commit
1172172453
2 changed files with 7 additions and 3 deletions
|
|
@ -13,10 +13,13 @@ function deactivate -d "Exit virtual environment and return to normal shell env
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
||||||
functions -e fish_prompt
|
|
||||||
set -e _OLD_FISH_PROMPT_OVERRIDE
|
set -e _OLD_FISH_PROMPT_OVERRIDE
|
||||||
functions -c _old_fish_prompt fish_prompt
|
# prevents error when using nested fish instances (Issue #93858)
|
||||||
functions -e _old_fish_prompt
|
if functions -q _old_fish_prompt
|
||||||
|
functions -e fish_prompt
|
||||||
|
functions -c _old_fish_prompt fish_prompt
|
||||||
|
functions -e _old_fish_prompt
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
set -e VIRTUAL_ENV
|
set -e VIRTUAL_ENV
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Prevent error when activating venv in nested fish instances.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue