ShellKind::quote_powershell("") does not produce an empty PowerShell argument.
quote_windows represents an empty argument as "". needs_quoting_powershell is true for the empty string, so quote_powershell then wraps that CRT form in single quotes and returns '""'. In PowerShell a single-quoted '""' is the two-character string of double quotes, not an empty argument.
quote_pwsh("") returns '', which is an empty argument. ShellKind::try_quote uses quote_powershell for ShellKind::PowerShell and quote_pwsh for ShellKind::Pwsh, so the same empty task argument is quoted differently for the two Windows shells. ShellBuilder::build calls try_quote on each task argument.
No regression test was added for the PowerShell result. Pinning '""' would freeze this behaviour.
ShellKind::quote_powershell("")does not produce an empty PowerShell argument.quote_windowsrepresents an empty argument as"".needs_quoting_powershellis true for the empty string, soquote_powershellthen wraps that CRT form in single quotes and returns'""'. In PowerShell a single-quoted'""'is the two-character string of double quotes, not an empty argument.quote_pwsh("")returns'', which is an empty argument.ShellKind::try_quoteusesquote_powershellforShellKind::PowerShellandquote_pwshforShellKind::Pwsh, so the same empty task argument is quoted differently for the two Windows shells.ShellBuilder::buildcallstry_quoteon each task argument.No regression test was added for the PowerShell result. Pinning
'""'would freeze this behaviour.