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

Spawning new terminal does not work for workspace with folders and "terminal.integrated.cwd": "${workspaceFolder}" #139842

Closed
drweb86 opened this issue Dec 28, 2021 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@drweb86
Copy link

drweb86 commented Dec 28, 2021

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

Version: 1.64.0-insider (user setup)
Commit: 7b9e5c3
Date: 2021-12-22T05:15:28.225Z
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.19044

Steps to Reproduce:

  1. Create workspace file
{
    "folders": [
        {
            "name": "scripts",
            "path": "."
        },
        {
            "name": "other",
            "path": ".//other"
        },
    ],
    "settings": {
        "terminal.integrated.cwd": "${workspaceFolder}",
    }
}

Create the other folder.
2. Open it in Visual Studio Code on Windows
3. Terminal \ New Terminal, select 'scripts'
4. Observe error:
The terminal process failed to launch: Starting directory (cwd) "\D:\sources\app" does not exist.
5. Terminal \ New Terminal, select 'other'
6. Observe error
The terminal process failed to launch: Starting directory (cwd) "\D:\sources\app" does not exist.

Actual behavior: spawning of terminal does not work for workspaces with folders. Relative paths support became broken.
Expected behavior: terminal opens normally with proper folder.

Relative paths support became broken is a regression caused by PR that fixed issue
#136099

@drweb86 drweb86 changed the title Spawning new terminal does not work for workspace with folders Spawning new terminal does not work for workspace with folders and "terminal.integrated.cwd": "${workspaceFolder}" Dec 28, 2021
@JesusDR01
Copy link

It's a little tricky.
You must delete your
"terminal.integrated.cwd": "${workspaceFolder}"

Then add:

    "terminal.integrated.profiles.windows": {
        "My PowerShell": {
            "source": "PowerShell",
            "args": ["-noexit", "cd","${fileDirname}"]
        }
    },
    "terminal.integrated.defaultProfile.windows": "My PowerShell"

@Tyriar
Copy link
Member

Tyriar commented Jan 4, 2022

/duplicate #136099

@Tyriar Tyriar closed this as completed Jan 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2022
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)
Projects
None yet
Development

No branches or pull requests

5 participants
@Tyriar @drweb86 @JesusDR01 @meganrogge and others