Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

windows: Fix semantic merge conflict with `ShellKind::new` (#40107)

Cole Millerdac5725246bf
diff --git a/crates/task/src/shell_builder.rs b/crates/task/src/shell_builder.rs
index 31c435e2025..a6504f4eb76 100644
--- a/crates/task/src/shell_builder.rs
+++ b/crates/task/src/shell_builder.rs
@@ -166,7 +166,7 @@ mod test {
#[test]
fn redirect_stdin_to_dev_null_fish() {
let shell = Shell::Program("fish".to_owned());
- let shell_builder = ShellBuilder::new(&shell);
+ let shell_builder = ShellBuilder::new(&shell, false);
let (program, args) = shell_builder
.redirect_stdin_to_dev_null()
diff --git a/crates/task/src/task.rs b/crates/task/src/task.rs
index 0b23a1cde0c..bfb84ced944 100644
--- a/crates/task/src/task.rs
+++ b/crates/task/src/task.rs
@@ -355,10 +355,10 @@ impl Shell {
}
}
- pub fn shell_kind(&self) -> ShellKind {
+ pub fn shell_kind(&self, is_windows: bool) -> ShellKind {
match self {
- Shell::Program(program) => ShellKind::new(program),
- Shell::WithArguments { program, .. } => ShellKind::new(program),
+ Shell::Program(program) => ShellKind::new(program, is_windows),
+ Shell::WithArguments { program, .. } => ShellKind::new(program, is_windows),
Shell::System => ShellKind::system(),
}
}
diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs
index 6c76af0542d..cf6851ac346 100644
--- a/crates/terminal/src/terminal.rs
+++ b/crates/terminal/src/terminal.rs
@@ -495,7 +495,7 @@ impl TerminalBuilder {
.unwrap_or(params.program.clone())
});
- let shell_kind = shell.shell_kind();
+ let shell_kind = shell.shell_kind(cfg!(windows));
let pty_options = {
let alac_shell = shell_params.as_ref().map(|params| {