Skip to content

Commit

Permalink
Merge pull request #323 from psyclaudeZ/master
Browse files Browse the repository at this point in the history
fix: prevent error about fish_prompt when using nested fish instances
  • Loading branch information
ekalinin authored Mar 16, 2023
2 parents 0f9e2e2 + f0f2a4b commit 08fa48b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions nodeenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,10 +1397,13 @@ def main():
# `fish_prompt` using `functions -e`.
set -l fish_function_path
# Erase virtualenv's `fish_prompt` and restore the original.
functions -e fish_prompt
functions -c _node_old_fish_prompt fish_prompt
functions -e _node_old_fish_prompt
# Prevents error when using nested fish instances
if functions -q _node_old_fish_prompt
# Erase virtualenv's `fish_prompt` and restore the original.
functions -e fish_prompt
functions -c _node_old_fish_prompt fish_prompt
functions -e _node_old_fish_prompt
end
set -e _OLD_NODE_FISH_PROMPT_OVERRIDE
end
Expand Down

0 comments on commit 08fa48b

Please sign in to comment.