Skip to content
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

Git Bash terminal initially displays the wrong working directory #23488

Closed
MaddyGuthridge opened this issue May 26, 2024 · 2 comments
Closed
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@MaddyGuthridge
Copy link

MaddyGuthridge commented May 26, 2024

Type: Bug

  1. Launch a Git Bash terminal.
  2. Observe that it displays the working directory as VS Code's executable directory within the prompt.

Additional notes:

  • The pwd command displays the expected working directory.
  • Running ls shows the contents of my project directory.
  • Upon running any cd command, the prompt updates and shows the correct working directory. Navigating back to the project directory shows the right location within the prompt.
  • Running commands that don't change the working directory causes the prompt to continue to display the wrong working directory.
  • This issue does not occur in PowerShell or Command Prompt.

Screen recording demonstrating bug

recording.mp4

More info

Extension version: 2024.6.0
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
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
Load (avg) undefined
Memory (System) 63.72GB (45.07GB free)
Process Argv --crash-reporter-id 5c6d9d8b-a993-40e2-bd9a-bf5c598b82f6
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
666c4381:30973075
chatpanelt:31048053
dsvsc021:30996838
9c06g630:31013171
pythoncenvpt:31049070
a69g1124:31058053
pythonprt:31056678
dwnewjupytercf:31046870
26j00206:31048877

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 26, 2024
@griffinator76
Copy link

I have seen the same issue, it occurs when using Git Bash with some projects but not others on the same computer. As far as I can tell all projects are using the same default settings.
For the affected projects I found that disabling the setting "Terminal > Integrated > Shell Integration" caused the correct path to be shown in the prompt, so possibly related to the startup script that this feature injects when a new terminal is started.

@anthonykim1
Copy link

Closing as duplicate to #23382

@anthonykim1 anthonykim1 closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants