Make ShellBuilder::new not branch on a remote shell (#39493)

Release Notes:

- Fixed claude code agent login on remotes

Co-authored-by: Max Brunsfeld <max@zed.dev>
Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
Lukas Wirth
2025-10-03 23:23:09 +02:00
committed by GitHub
co-authored by Max Brunsfeld Cole Miller
parent 4443f61c16
commit 2859cbdba9
10 changed files with 70 additions and 62 deletions
@@ -117,7 +117,7 @@ impl DapLocator for CargoLocator {
.cwd
.clone()
.context("Couldn't get cwd from debug config which is needed for locators")?;
let builder = ShellBuilder::new(None, &build_config.shell).non_interactive();
let builder = ShellBuilder::new(&build_config.shell).non_interactive();
let (program, args) = builder.build(
Some("cargo".into()),
&build_config
+5 -3
View File
@@ -452,10 +452,12 @@ impl Project {
let path = self.first_project_directory(cx);
let remote_client = self.remote_client.as_ref();
let settings = self.terminal_settings(&path, cx).clone();
let remote_shell = remote_client
let shell = remote_client
.as_ref()
.and_then(|remote_client| remote_client.read(cx).shell());
let builder = ShellBuilder::new(remote_shell.as_deref(), &settings.shell).non_interactive();
.and_then(|remote_client| remote_client.read(cx).shell())
.map(Shell::Program)
.unwrap_or_else(|| settings.shell.clone());
let builder = ShellBuilder::new(&shell).non_interactive();
let (command, args) = builder.build(Some(command), &Vec::new());
let mut env = self