PS1 missing parenthesis around venv
#24097
Labels
area-terminal
bug
Issue identified by VS Code Team member as probable bug
info-needed
Issue requires more information from poster
Summary
I have several fully functioning projects, each with their own venv.
Randomly, and unpredictably, they will sometimes become afflicted by a curse which causes the
PS1
bash prompt to display wrong:What it should be
What I get:
Description
This is a pain to reproduce on Mac, and I have not managed to reliably get a minimal reproduction case, but I have a repro on Ubuntu (documented here).
It seems that the issue is caused (maybe?) on MacOS by just being
/Users/addison/work/allprojects.code-workspace
:I'm pretty sure that just moving the project into a different dir works, except that you have to re-generate the venv, as it contains absolute paths.
I can confirm that this is unrelated, to the
venv/bin/activate
being different between "broken" folders in a workspace.These files are identical in every way (except for the line:
VIRTUAL_ENV=/different/path/for/each/project
) when comparing a broken folder which exhibits this behaviour (venvusername
), and a functioning folder which does not ((venv) username
).Environment and Versions
This happens on Mac and Linux (and probably also Windows, but unconfirmed)
Python 3.9, 3.10 and 3.13 - probably all versions?
Links
This is the PR I believe caused this issue, or may be related to it in some capacity.
#23201
Here is a stack overflow post I made, about the same thing:
https://stackoverflow.com/questions/78961614/vscode-ps1-missing-parenthesis-around-venv
The text was updated successfully, but these errors were encountered: