Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prevent python extension from overriding gitbash pwd#24832

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

anthonykim1
Copy link

@anthonykim1anthonykim1 commentedFeb 19, 2025
edited
Loading

Gitbash repro steps:

  • Opt into Terminal Env Var experiment
  • Make sure shell integration setting is on (generic terminal one)
  • Be on Windows gitbash (with activated environment)
  • You will see messed up prompt cwd

Resolves:#23382

@anthonykim1anthonykim1 added the skip testsUpdates to tests unnecessary labelFeb 19, 2025
@anthonykim1anthonykim1 self-assigned thisFeb 19, 2025
@anthonykim1
Copy link
Author

anthonykim1 commentedFeb 19, 2025
edited
Loading

Always turning off applyAtShellIntegration option seem to resolve the issue. (So only applying things ONLY at the process creation resolves the issue, whereas before sometimes both were enabled as true which seemed to lead to repro of the behavior)

                        const options = {                            applyAtShellIntegration: false,                            applyAtProcessCreation: true,                        };

but this is concerning, given that we had to switch to this "double prepend" for some reasons in the past.

Reference:#22905 (double prepend) instead of#21906 (for prepending)

Potential cause:

  1. It could be a problem with applyAtShellIntegration itself
  2. It could be problem with the fact that we are applying at BOTH applyAtShellIntegration AND applyAtProcessCreation.
  3. VSCODE_CWD and PWD is wrongly set from core, and in the process of implicitly activate user's environment (via terminal env var experiment setting each individual user's environment variable, we wrongly cache and set this not-intended to be saved/cached VSCODE_CWD and PWDScreenshot 2025-02-19 at 1 36 15 PM
    and
    Screenshot 2025-02-18 at 4 16 08 PM

Fix: Avoid setting PWD when in Terminal Env Var experiment.

@anthonykim1anthonykim1force-pushed theanthonykim/InvestigateGitBash branch frombfe89b8 to42962ceCompareFebruary 20, 2025 21:24
@anthonykim1anthonykim1 added bugIssue identified by VS Code Team member as probable bug area-terminal labelsFeb 20, 2025
@anthonykim1anthonykim1 changed the titleDebug gitbash problemPrevent Python extension overriding Gitbash pwdFeb 20, 2025
@anthonykim1anthonykim1 changed the titlePrevent Python extension overriding Gitbash pwdPrevent python extension from overriding gitbash pwdFeb 20, 2025
@anthonykim1anthonykim1 marked this pull request as ready for reviewFebruary 20, 2025 22:30
@anthonykim1anthonykim1 added this to theFebruary 2025 milestoneFeb 20, 2025
@vs-code-engineeringVS Code Engineering
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically.Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting/AzurePipelines run.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@karthiknadigkarthiknadigkarthiknadig approved these changes

Assignees

@anthonykim1anthonykim1

Labels
area-terminalbugIssue identified by VS Code Team member as probable bugskip testsUpdates to tests unnecessaryskip-issue-check
Projects
None yet
Milestone
February 2025
Development

Successfully merging this pull request may close these issues.

Gitbash terminal not opening to workspace folder.
2 participants
@anthonykim1@karthiknadig

[8]ページ先頭

©2009-2025 Movatter.jp