From 2f279c5de437f9119e692fdce5132f601fc604f2 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 2 Sep 2025 07:07:23 -0700 Subject: [PATCH] Fix small errors preventing WSL support from working (#37350) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On nightly, when I run `zed` under WSL, I get an error parsing the shebang line ``` /usr/bin/env: ‘sh\r’: No such file or directory ``` I believe that this is because in CI, Git checks out the file with CRLF line endings, and that is how it is copied into the installer. Also, the file extension was incorrect when downloading the production remote server (a gzipped binary), preventing extraction from working properly. Release Notes: - N/A --- .gitattributes | 3 +++ crates/remote/src/transport/wsl.rs | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9973cfb4db9ce8e9c79e84b9861a946f2f1c2f15..0dedc2d567dac982b217453c266a046b09ea4830 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ # Prevent GitHub from displaying comments within JSON files as errors. *.json linguist-language=JSON-with-Comments + +# Ensure the WSL script always has LF line endings, even on Windows +crates/zed/resources/windows/zed-wsl text eol=lf diff --git a/crates/remote/src/transport/wsl.rs b/crates/remote/src/transport/wsl.rs index ea8f2443d9a674492674bdc2fb19f2a021b03dcc..2b4d29eafeede14f305c4d21f61188b858253285 100644 --- a/crates/remote/src/transport/wsl.rs +++ b/crates/remote/src/transport/wsl.rs @@ -164,10 +164,7 @@ impl WslRemoteConnection { delegate.set_status(Some("Installing remote server"), cx); let wanted_version = match release_channel { - ReleaseChannel::Nightly => None, - ReleaseChannel::Dev => { - return Err(anyhow!("Dev builds require manual installation")); - } + ReleaseChannel::Nightly | ReleaseChannel::Dev => None, _ => Some(cx.update(|cx| AppVersion::global(cx))?), }; @@ -176,7 +173,7 @@ impl WslRemoteConnection { .await?; let tmp_path = RemotePathBuf::new( - PathBuf::from(format!("{}.{}.tmp", dst_path, std::process::id())), + PathBuf::from(format!("{}.{}.gz", dst_path, std::process::id())), PathStyle::Posix, );