Launching with --startingDirectory does not work for "." in v1.23 - affects VSCode #22878

Closed
opened 2026-01-31 08:26:02 +00:00 by claunia · 4 comments
Owner

Originally created by @rkodey on GitHub (Feb 8, 2025).

Windows Terminal version

1.23.10353.0

Windows build number

10.0.19045.5371

Other Software

  • Windows Terminal in portable mode using ".portable"
  • This bug affects VSCode, when it launches the external terminal.
    • But, VSCode is not required, as shown below

Steps to reproduce

See basic configuration settings.json in comment below
Open a command prompt

cd \Users

Expected Behavior

Version 1.22.10352.0 works as expected.

cd \Users
command-line Opens Terminal In
wt.exe C:\Users
wt.exe -d . C:\Users
wt.exe -d "." C:\Users
wt.exe -d "C:\Users" C:\Users
wt.exe --startingDirectory . C:\Users
wt.exe --startingDirectory "." C:\Users
wt.exe --startingDirectory "C:\Users" C:\Users

Actual Behavior

Version 1.23.10353.0 shows the bug.

cd \Users
command-line Opens Terminal In
wt.exe C:\WINDOWS\system32
wt.exe -d . C:\WINDOWS\system32
wt.exe -d "." C:\WINDOWS\system32
wt.exe -d "C:\Users" C:\Users
wt.exe --startingDirectory . C:\WINDOWS\system32
wt.exe --startingDirectory "." C:\WINDOWS\system32
wt.exe --startingDirectory "C:\Users" C:\Users
Originally created by @rkodey on GitHub (Feb 8, 2025). ### Windows Terminal version 1.23.10353.0 ### Windows build number 10.0.19045.5371 ### Other Software - Windows Terminal in portable mode using ".portable" - **This bug affects VSCode**, when it launches the external terminal. - But, VSCode is not required, as shown below ### Steps to reproduce See basic configuration settings.json in comment below Open a command prompt ``` cd \Users ``` ### Expected Behavior > Version **1.22.10352.0** works as expected. ``` cd \Users ``` command-line | Opens Terminal In --- | --- wt.exe | C:\Users wt.exe -d . | C:\Users wt.exe -d "." | C:\Users wt.exe -d "C:\Users" | C:\Users wt.exe --startingDirectory . | C:\Users wt.exe --startingDirectory "." | C:\Users wt.exe --startingDirectory "C:\Users" | C:\Users ### Actual Behavior > Version **1.23.10353.0** shows the bug. ``` cd \Users ``` command-line | Opens Terminal In --- | --- wt.exe | C:\WINDOWS\system32 wt.exe -d . | C:\WINDOWS\system32 wt.exe -d "." | C:\WINDOWS\system32 wt.exe -d "C:\Users" | C:\Users wt.exe --startingDirectory . | C:\WINDOWS\system32 wt.exe --startingDirectory "." | C:\WINDOWS\system32 wt.exe --startingDirectory "C:\Users" | C:\Users
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 08:26:02 +00:00
Author
Owner

@rkodey commented on GitHub (Feb 8, 2025):

Here's the minimal settings.json to show the issue.
I started with a blank configuration

  • Set default profile to Coommand Prompt
  • Ser Command Prompt starting directory to null
{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema-preview",
    "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
    "profiles": 
    {
        "defaults": {},
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt",
                "startingDirectory": null
            }
        ]
    }
}
@rkodey commented on GitHub (Feb 8, 2025): Here's the minimal `settings.json` to show the issue. I started with a blank configuration - Set default profile to Coommand Prompt - Ser Command Prompt starting directory to null ``` { "$help": "https://aka.ms/terminal-documentation", "$schema": "https://aka.ms/terminal-profiles-schema-preview", "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "profiles": { "defaults": {}, "list": [ { "commandline": "%SystemRoot%\\System32\\cmd.exe", "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "hidden": false, "name": "Command Prompt", "startingDirectory": null } ] } } ```
Author
Owner

@duckiendoan commented on GitHub (Feb 19, 2025):

I'm having the same issue. Any updates on this?

@duckiendoan commented on GitHub (Feb 19, 2025): I'm having the same issue. Any updates on this?
Author
Owner

@DHowett commented on GitHub (Mar 26, 2025):

Thanks all for the discussion here! We just triaged a newer version of this (sorry for the higher number): /dup #18604.

@DHowett commented on GitHub (Mar 26, 2025): Thanks all for the discussion here! We just triaged a newer version of this (sorry for the higher number): /dup #18604.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Mar 26, 2025):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Mar 26, 2025): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22878