wt.exe startingDirectory argument fails with path containing spaces and a trailing backslash #23625

Open
opened 2026-01-31 08:47:33 +00:00 by claunia · 0 comments
Owner

Originally created by @stuerp on GitHub (Sep 20, 2025).

Windows Terminal version

Preview_1.24.2372.0_x64

Windows build number

10.0.26100.4946

Other Software

PowerShell 7.5.3 as default profile

Steps to reproduce

Fails to set the starting directory (note the trailing backslash):

wt.exe --startingDirectory "c:\A\B B\"

Successfully sets the starting directory:

wt.exe --startingDirectory "c:\A\B B"

Expected Behavior

The starting directory should be set in both cases.

Actual Behavior

[error 2147942402 (0x80070002) when launching `B\']
The system cannot find the file specified.
Originally created by @stuerp on GitHub (Sep 20, 2025). ### Windows Terminal version Preview_1.24.2372.0_x64 ### Windows build number 10.0.26100.4946 ### Other Software PowerShell 7.5.3 as default profile ### Steps to reproduce Fails to set the starting directory (note the trailing backslash): `wt.exe --startingDirectory "c:\A\B B\"` Successfully sets the starting directory: `wt.exe --startingDirectory "c:\A\B B"` ### Expected Behavior The starting directory should be set in both cases. ### Actual Behavior ``` [error 2147942402 (0x80070002) when launching `B\'] The system cannot find the file specified. ```
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:47:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23625