Skip to content

fix: Align WSL PowerShell invocation with Windows - #126

Merged
Byron merged 1 commit into
mainfrom
fix-wsl
Jul 12, 2026
Merged

fix: Align WSL PowerShell invocation with Windows#126
Byron merged 1 commit into
mainfrom
fix-wsl

Conversation

@Byron

@Byron Byron commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Pass the WSL open target to PowerShell through the OPEN_RS_TARGET
environment variable instead of embedding it in the command string and
escaping it as a single-quoted PowerShell value.

This matches the safer invocation already used by the native Windows
backend. Keeping the PowerShell program fixed ensures that paths and URLs
are treated purely as data, even when they contain quotes, semicolons, or
other PowerShell metacharacters. It also removes the need for custom
PowerShell quoting and avoids converting the target through
to_string_lossy() during command construction.

Add -NonInteractive for consistency with the Windows launcher and update
the WSL tests to verify both the fixed command and the unchanged
environment-variable value.

Pass the WSL open target to PowerShell through the OPEN_RS_TARGET
environment variable instead of embedding it in the command string and
escaping it as a single-quoted PowerShell value.

This matches the safer invocation already used by the native Windows
backend. Keeping the PowerShell program fixed ensures that paths and URLs
are treated purely as data, even when they contain quotes, semicolons, or
other PowerShell metacharacters. It also removes the need for custom
PowerShell quoting and avoids converting the target through
to_string_lossy() during command construction.

Add -NonInteractive for consistency with the Windows launcher and update
the WSL tests to verify both the fixed command and the unchanged
environment-variable value.
@Byron
Byron marked this pull request as ready for review July 12, 2026 08:10
@Byron
Byron merged commit bdc3397 into main Jul 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant