Better handle shell for remote ssh projects (#19297)
Release Notes: - N/A Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
parent
d35b646dbb
commit
3dcc638537
2 changed files with 20 additions and 8 deletions
|
@ -395,7 +395,21 @@ impl TerminalPanel {
|
|||
let mut spawn_task = spawn_in_terminal.clone();
|
||||
// Set up shell args unconditionally, as tasks are always spawned inside of a shell.
|
||||
let Some((shell, mut user_args)) = (match spawn_in_terminal.shell.clone() {
|
||||
Shell::System => retrieve_system_shell().map(|shell| (shell, Vec::new())),
|
||||
Shell::System => {
|
||||
match self
|
||||
.workspace
|
||||
.update(cx, |workspace, cx| workspace.project().read(cx).is_local())
|
||||
{
|
||||
Ok(local) => {
|
||||
if local {
|
||||
retrieve_system_shell().map(|shell| (shell, Vec::new()))
|
||||
} else {
|
||||
Some(("\"${SHELL:-sh}\"".to_string(), Vec::new()))
|
||||
}
|
||||
}
|
||||
Err(_no_window_e) => return,
|
||||
}
|
||||
}
|
||||
Shell::Program(shell) => Some((shell, Vec::new())),
|
||||
Shell::WithArguments { program, args } => Some((program, args)),
|
||||
}) else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue