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

Restarting a process loses pwd #16501

Open
NewtonChutney opened this issue Dec 28, 2023 · 2 comments
Open

Restarting a process loses pwd #16501

NewtonChutney opened this issue Dec 28, 2023 · 2 comments
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.

Comments

@NewtonChutney
Copy link

Windows Terminal version

1.18.3181.0

Windows build number

10.0.22631.2861

Other Software

No response

Steps to reproduce

  1. Set exit behaviour in Terminal to never close automatically by default
    "profiles": 
    {
        "defaults": 
        {
            "closeOnExit": "never", 
    ...
  1. Launch a terminal app (a shell/cli editor) from the address bar in File Explorer
  2. close it
  3. press enter to restart

Expected Behavior

The respawned process should have the same environment as the original process.

Actual Behavior

The respawned process launches with the default launch directory of WT, C:\WINDOWS\system32>

2023-12-28.11-29-35.mp4
@NewtonChutney NewtonChutney added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 28, 2023
@zadjii-msft
Copy link
Member

Okay, so this isn't shell integration related. I bet this regressed in 1.18. We probably still need to initially seed the TermControl's CWD with the "virtual cwd" we used at the time we created that control, ala #15280

(you could probably work around this today by having your shell manually tell the Terminal about the CWD: https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory)

@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jan 3, 2024
@zadjii-msft zadjii-msft added this to the Terminal v1.20 milestone Jan 3, 2024
@TGSAN
Copy link

TGSAN commented Jan 6, 2024

Okay, so this isn't shell integration related. I bet this regressed in 1.18. We probably still need to initially seed the TermControl's CWD with the "virtual cwd" we used at the time we created that control, ala #15280

(you could probably work around this today by having your shell manually tell the Terminal about the CWD: https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory)

Maybe this is related to the “issue reappears after update 1.18” that occurred in #15173 ?

@zadjii-msft zadjii-msft self-assigned this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants