remote: Fetch shell on ssh remote to use for preparing commands (#36690)

Prerequisite for https://github.com/zed-industries/zed/pull/36576 to
allow us to differentiate the shell in a remote.

Release Notes:

- N/A
This commit is contained in:
Lukas Wirth 2025-08-21 19:08:26 +02:00 committed by GitHub
parent 6f32d36ec9
commit b284b1a0b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 121 additions and 52 deletions

View file

@ -916,7 +916,10 @@ impl RunningState {
let task_store = project.read(cx).task_store().downgrade();
let weak_project = project.downgrade();
let weak_workspace = workspace.downgrade();
let is_local = project.read(cx).is_local();
let ssh_info = project
.read(cx)
.ssh_client()
.and_then(|it| it.read(cx).ssh_info());
cx.spawn_in(window, async move |this, cx| {
let DebugScenario {
@ -1000,7 +1003,7 @@ impl RunningState {
None
};
let builder = ShellBuilder::new(is_local, &task.resolved.shell);
let builder = ShellBuilder::new(ssh_info.as_ref().map(|info| &*info.shell), &task.resolved.shell);
let command_label = builder.command_label(&task.resolved.command_label);
let (command, args) =
builder.build(task.resolved.command.clone(), &task.resolved.args);