Repository navigation
Bind a switch value that PowerShell 7 has already evaluated - #5391
Conversation
5b220c6
into
Devolutions:main
|
Looks good, Thanks for looking into this and fixing it! |
|
Confirming this also affects v2026.3.0, which was published on 2026-09-15 — two days before this PR merged — so no release currently includes the fix. Repro on v2026.3.0 (pwsh 7.5.x, PSResourceGet 1.2.0): updating
because pwsh hands the launcher an already-evaluated bool for Could you confirm which release will carry this fix (v2026.3.1?), so users know when the local workaround — patching |
|
Jordan Humberto de Souza (@SHJordan) I don't know the release cycle. I was affected by the bug and wrote a fix as a volunteer contributor to an open source project.
so you could continue using that, or you could just pull and build the main branch yourself from the repo. What do you gain from chasing people over release dates? Also, please at least proof-read your LLM output before posting it. Some real humans still read and write code, and a comment like
on a completed PR, linked to a raised bug for the issue you're asking about doesn't make much sense; the PR was both raised and merged after the release, so of course it affects said release. It's just wasting people's time. I have a real project manager at work for wasting my time, I don't need one for volunteer work, too. |
The existing code for parsing
-Confirm:$falseonly worked under PowerShell 5.x (powershell.exe), which splits the pair and passes the value on as the literal text$false. PowerShell 7 (pwsh.exe) splits it too, but evaluates the value first and passes a real boolean, which the launcher did not recognise. The pair fell through to the array splat and the cmdlet rejected it with "a positional parameter cannot be found that accepts argument 'False'".This fix adds parsing for the PowerShell 7 shape in the same style as the existing parsing without affecting the PowerShell 5.x path.
Closes #5388