From d85ba5c784e78db9fe469b72312434e24606ce05 Mon Sep 17 00:00:00 2001 From: Julia Ryan Date: Wed, 15 Oct 2025 18:58:30 -0700 Subject: [PATCH 1/2] Fix mkdir nushell flags --- crates/remote/src/transport/wsl.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/remote/src/transport/wsl.rs b/crates/remote/src/transport/wsl.rs index 5d6dadb7adc113..171651131ac65a 100644 --- a/crates/remote/src/transport/wsl.rs +++ b/crates/remote/src/transport/wsl.rs @@ -184,9 +184,13 @@ impl WslRemoteConnection { paths::remote_wsl_server_dir_relative().join(RelPath::unix(&binary_name).unwrap()); if let Some(parent) = dst_path.parent() { - self.run_wsl_command("mkdir", &["-p", &parent.display(PathStyle::Posix)]) - .await - .map_err(|e| anyhow!("Failed to create directory: {}", e))?; + let arch_str = if shell == ShellKind::Nushell { + self.run_wsl_command("mkdir", &[&parent.display(PathStyle::Posix)]) + } else { + self.run_wsl_command("mkdir", &["-p", &parent.display(PathStyle::Posix)]) + } + .await + .map_err(|e| anyhow!("Failed to create directory: {}", e))?; } #[cfg(debug_assertions)] From e9949164a9e4e15e16f41a91a40b3cd45b6b51ef Mon Sep 17 00:00:00 2001 From: Julia Ryan Date: Wed, 15 Oct 2025 19:02:47 -0700 Subject: [PATCH 2/2] Thread shell through --- crates/remote/src/transport/wsl.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/remote/src/transport/wsl.rs b/crates/remote/src/transport/wsl.rs index 171651131ac65a..f5a86fd16f0b63 100644 --- a/crates/remote/src/transport/wsl.rs +++ b/crates/remote/src/transport/wsl.rs @@ -82,7 +82,7 @@ impl WslRemoteConnection { this.can_exec = this.detect_can_exec(shell).await?; this.platform = this.detect_platform(shell).await?; this.remote_binary_path = Some( - this.ensure_server_binary(&delegate, release_channel, version, commit, cx) + this.ensure_server_binary(&delegate, release_channel, version, commit, shell, cx) .await?, ); log::debug!("Detected WSL environment: {this:#?}"); @@ -163,6 +163,7 @@ impl WslRemoteConnection { release_channel: ReleaseChannel, version: SemanticVersion, commit: Option, + shell: ShellKind, cx: &mut AsyncApp, ) -> Result> { let version_str = match release_channel { @@ -184,12 +185,12 @@ impl WslRemoteConnection { paths::remote_wsl_server_dir_relative().join(RelPath::unix(&binary_name).unwrap()); if let Some(parent) = dst_path.parent() { - let arch_str = if shell == ShellKind::Nushell { - self.run_wsl_command("mkdir", &[&parent.display(PathStyle::Posix)]) + let parent = parent.display(PathStyle::Posix); + if shell == ShellKind::Nushell { + self.run_wsl_command("mkdir", &[&parent]).await } else { - self.run_wsl_command("mkdir", &["-p", &parent.display(PathStyle::Posix)]) + self.run_wsl_command("mkdir", &["-p", &parent]).await } - .await .map_err(|e| anyhow!("Failed to create directory: {}", e))?; }