[3.10] gh-93858: Prevent error when activating venv in nested fish instances (GH-93931) (GH-98403)

Co-authored-by: Thomas B. Brunner <thomasbbrunner@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-10-18 08:39:06 -07:00 committed by GitHub
parent 676cdea18f
commit ce87ab4dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -13,10 +13,13 @@ function deactivate -d "Exit virtual environment and return to normal shell env
end
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
functions -e fish_prompt
set -e _OLD_FISH_PROMPT_OVERRIDE
functions -c _old_fish_prompt fish_prompt
functions -e _old_fish_prompt
# prevents error when using nested fish instances (Issue #93858)
if functions -q _old_fish_prompt
functions -e fish_prompt
functions -c _old_fish_prompt fish_prompt
functions -e _old_fish_prompt
end
end
set -e VIRTUAL_ENV

View file

@ -0,0 +1 @@
Prevent error when activating venv in nested fish instances.