task: Fix ShellBuilder::redirect_stdin_to_dev_null constructing invalid commands on windows (#39227)

Release Notes:

- Fixed agents not being able to use the terminal tool with powershell

Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
Lukas Wirth 2025-09-30 19:55:46 +02:00 committed by GitHub
parent ace617037f
commit 67ebb1f795
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -288,7 +288,7 @@ impl ShellBuilder {
combined_command.push_str(") </dev/null");
}
ShellKind::PowerShell => {
combined_command.insert_str(0, "$null | {");
combined_command.insert_str(0, "`$null | & {");
combined_command.push_str("}");
}
ShellKind::Cmd => {