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

Lukas Wirth and Cole Miller created

Release Notes:

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

Co-authored-by: Cole Miller <cole@zed.dev>

Change summary

crates/task/src/shell_builder.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/task/src/shell_builder.rs 🔗

@@ -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 => {