-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Looked for similar issues and could not find any.
Steps to reproduce bug:
- activate venv
- spawn child fish process (or start tmux session)
- activate same venv
source activate.fish
fish
source activate.fish
Should output:
functions: Function “_old_fish_prompt” does not exist
Cause
I think I've identified the reason for the bug:
- The environment variables set in
activate.fishare exported to child processes (script usesset -gxto set the variables). - However, the function
_old_fish_promptis not exported to child processes.
So, when we run fish from another fish session (such as in tmux), the variables set in activate.fish are present in the child process, but the functions are not.
Fix
I've written a fix for this, which is to test if the _old_fish_prompt function exists before attempting to delete it. I can make a PR with this fix.
Also, the implementation from virtualenv does not suffer from this bug. They check if the function exists before deleting it.
Your environment
Ubuntu 22.04 amd64
Python 3.10.4
Python and venv packages installed from apt
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error