From 18bc26866e62910d2dbd8cb87789a098d7d08aa0 Mon Sep 17 00:00:00 2001 From: John Tur Date: Mon, 26 Jan 2026 15:51:13 -0500 Subject: [PATCH] Fix extraction of Windows remote server (#47690) Release Notes: - N/A --- crates/remote/src/transport/ssh.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/remote/src/transport/ssh.rs b/crates/remote/src/transport/ssh.rs index ee68435eb6e90497b4982dbf47aef07335a8d1bd..a7aa7e08e6b75c32211d7b06ed82498deb03e175 100644 --- a/crates/remote/src/transport/ssh.rs +++ b/crates/remote/src/transport/ssh.rs @@ -945,9 +945,15 @@ impl SshRemoteConnection { .try_quote(&orig_tmp_path) .context("shell quoting")?; let tmp_path = shell_kind.try_quote(tmp_path).context("shell quoting")?; + let tmp_exe_path = format!("{tmp_path}\\remote_server.exe"); + let tmp_exe_path = shell_kind + .try_quote(&tmp_exe_path) + .context("shell quoting")?; format!( "Expand-Archive -Force -Path {orig_tmp_path} -DestinationPath {tmp_path} -ErrorAction Stop; - Move-Item -Force {tmp_path} {dst_path}", + Move-Item -Force {tmp_exe_path} {dst_path}; + Remove-Item -Force {tmp_path} -Recurse; + Remove-Item -Force {orig_tmp_path}", ) } else { let orig_tmp_path = shell_kind