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

On Windows, after session contents restored, the current directory is reset to workspace root #137180

Closed
mastazi opened this issue Nov 14, 2021 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal-persistence Relating to process reconnection or process revive

Comments

@mastazi
Copy link

mastazi commented Nov 14, 2021

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:
    Version: 1.63.0-insider (user setup)
    Commit: 3bd29c1
    Date: 2021-11-12T12:04:20.740Z
    Electron: 13.5.2
    Chromium: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Windows_NT x64 10.0.22000
  • OS Version: Windows 11
  • Important: in VS Code Integrated Terminal I am using PowerShell 7.2.0 which I installed from Microsoft Store

Steps to Reproduce:

  1. Open a workspace on VS Code
  2. In the integrated terminal, cd to a sub directory in the workspace e.g. cd .\src\
  3. Observe the prompt, it will inform you that you are now located in src directory
  4. Close VS Code
  5. Reopen VS Code
  6. Observe the prompt below the message "Session contents restored from "...
  7. The prompt is now back in the root of the project, not in src
  8. Following the same steps on Mac, after restoring the session contents, I am still in src
  9. This inconsistency between Windows and Mac behaviour, leads me to believe that there is a bug in the Windows version.
@meganrogge meganrogge added the terminal-persistence Relating to process reconnection or process revive label Nov 15, 2021
@meganrogge
Copy link
Contributor

On Windows, we aren't able to detect when the cwd has changed, so we have to use the initialCwd on restore of the process.

@meganrogge
Copy link
Contributor

/duplicate / covered by #133084

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal-persistence Relating to process reconnection or process revive
Projects
None yet
Development

No branches or pull requests

4 participants
@mastazi @Tyriar @meganrogge and others