-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitbash terminal not opening to workspace folder. #23382
Comments
Hello @dmurphyinsaas Thanks for filing the issue. |
Thank you for your response. |
I faced the same problem 3 days ago, after upgrade ms-python from v2024.4.1 to 2024.6.0 (venv) 'which python' command said that global python is used deactivate command gives following result: user@DESKTOP-NAME MINGW64 C:/Project/Folder By the way, if during terminal start-up or relaunch, when strange (venv) is active, I go 'cd c:/Project/Folder' and try to activate proper project's (venv), than I get 2 (venv) activated! As following: (venv) (venv) |
Same here, Git Bash with a venv that worked just fine until a couple of weeks ago. In my case I had manually set up a The |
Hello everyone, thanks for looking into this issue. Please note that Gitbash is not currently officially supported by Python extension, so please consider switching your default terminal to other such as cmd, bash, zsh, etc Reference: #22908 We may support Gitbash once we have more time/bandwidth in doing so. |
@anthonykim1 Gitbash has been the standard terminal everywhere I have worked using VS Code so it's surprising to hear you don't support this. |
@griffinator76 Yes, it seems pretty obvious how many people want proper Gitbash support, so I will be bringing this up to the team. |
@anthonykim1 I assumed after VSCode v1.89 enabled shell integration for Git Bash this meant it would become fully supported in the extension too? I really hope the team would reconsider. I don't know if you have any metrics around this but I expect Git Bash to be the most common shell on Windows, which makes it really strange that it is not properly supported. The UX using it with the Python extension is quite miserable too, with many glitches around venv activation: "Re-activating terminals" taking a long time, sometimes the "(venv)" label is missing, sometimes it is not activated properly or cannot be deactivated cleanly. There have been many issues filed here about those problems but almost all of them got dismissed. |
It's a little annoying, but it's incorrect that bash opens the wrong folder. True, at the beginning of the prompt, instead of the current folder, it shows the path to the folder where the vs code is installed (which is the annoying part), but bash itself is opened in the folder where it should be. You can check with a simple |
@ZdravekSprite I've found that I can actually just do |
Yes cd . works for me too, but it needs to be fixed. |
Thank you! This is much faster than disabling Shell Integration and having to source .venv/Scripts/activate every damned time... cd . is much faster... super weird that it's just reading the wrong string for the directory, and only initially... |
I am also facing the same issue. Turning off the Shell Integration did solved the path issue, but the environment prompt still remains even though environment is not active. |
Did anyone know how use Bash/Zsh on Windows (other than GitBash)? |
Facing the same issue here as well, turning off Shell Integration seems to have fixed it. I had this on my other PC a few months ago and I somehow got it to go away without turning off Shell Integration but I am unable to replicate that behaviour on my current PC despite copying all settings |
same issue |
Hey @anthonykim1, this issue might need further attention. @dmurphyinsaas, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
Hi @anthonykim1 I have been working with that "Shell Integration" option disabled as per @Okhnovsky post above. If I re-enable that option and perform the steps in my original post, I can still see the issue with the path showing as C:/Users/myuser/AppData/Local/Programs/Microsoft VS Code after re-launching the terminal. |
Thanks everyone for the input. Does the problem persist even after disabling Python extension? |
@anthonykim1 No, only when the Python extension is active.
|
To avoid the |
Type: Bug
Behaviour
When I open a Gitbash terminal window, rather than the path being set to current workspace directory as before, it is being set to some
C:/Users/myuser/AppData/Local/Programs/Microsoft VS Code path and it appears some venv is active.
Steps to reproduce:
Diagnostic data
launch.json
configurationOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output for
Python Debugger
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython Debugger
)Extension version: 2024.7.11291009
VS Code version: Code 1.89.0 (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:09:22.859Z)
OS version: Windows_NT x64 10.0.22631
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: