Script opened with WT fail when there is space in the path #17967

Open
opened 2026-01-31 05:59:52 +00:00 by claunia · 0 comments
Owner

Originally created by @VCourdy on GitHub (Jul 19, 2022).

Windows Terminal version

1.14.1862.0

Windows build number

10.0.22000.0

Other Software

Powershell 5.1.22000.653

Steps to reproduce

  1. Set WT as the default terminal (Settings > Startup)
  2. Create a PS1 script in a folder with space
    Write-Host "Bar"
    Pause
    
    Example : foo.ps1 in C:\folder with space
  3. Double click the script
  4. Error :
    "the term "C:\folder" is not recognized as cmdlet function script file or operable program..."

Expected Behavior

Output "Bar"

Actual Behavior

When WT launch a script by double clicking or doing right click / open, the script location is not correctly encapsulated in double quotes.

Originally created by @VCourdy on GitHub (Jul 19, 2022). ### Windows Terminal version 1.14.1862.0 ### Windows build number 10.0.22000.0 ### Other Software Powershell 5.1.22000.653 ### Steps to reproduce 1. Set WT as the default terminal (Settings > Startup) 2. Create a PS1 script in a folder with space ```powershell Write-Host "Bar" Pause ``` Example : foo.ps1 in C:\folder with space 3. Double click the script 4. Error : "the term "C:\folder" is not recognized as cmdlet function script file or operable program..." ### Expected Behavior Output "Bar" ### Actual Behavior When WT launch a script by double clicking or doing right click / open, the script location is not correctly encapsulated in double quotes.
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:59:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17967