From 3d37611b6f20b158454014b5d886805a06902e71 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Fri, 5 Sep 2025 17:43:39 +0200 Subject: [PATCH] cli: Rename script zed-wsl to zed, and enable on non-WSL (#37631) Closes #23026 With this hotfix, git committing from the built-in Zed terminal (well, PowerShell), now works. Release Notes: - N/A --- .gitattributes | 2 +- crates/zed/resources/windows/{zed-wsl => zed.sh} | 4 ++-- script/bundle-windows.ps1 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename crates/zed/resources/windows/{zed-wsl => zed.sh} (88%) diff --git a/.gitattributes b/.gitattributes index 0dedc2d567dac982b217453c266a046b09ea4830..37d28993301fef9c7eb4da0847cc9f4b7a5f1fbb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,4 +2,4 @@ *.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 +crates/zed/resources/windows/zed text eol=lf diff --git a/crates/zed/resources/windows/zed-wsl b/crates/zed/resources/windows/zed.sh similarity index 88% rename from crates/zed/resources/windows/zed-wsl rename to crates/zed/resources/windows/zed.sh index d3cbb93af6f5979508229656deadeab0dbf21661..734b1a7eb00dc304786a58674171fdb5872b90c8 100644 --- a/crates/zed/resources/windows/zed-wsl +++ b/crates/zed/resources/windows/zed.sh @@ -20,6 +20,6 @@ if [ $IN_WSL = true ]; then "$ZED_PATH/zed.exe" --wsl "$WSL_USER@$WSL_DISTRO_NAME" "$@" exit $? else - echo "Only WSL is supported for now" >&2 - exit 1 + "$ZED_PATH/zed.exe" "$@" + exit $? fi diff --git a/script/bundle-windows.ps1 b/script/bundle-windows.ps1 index 84ad39fb706f9d3e0e4af73a68b468e0bea33ee1..a26abf8413f375b611d01d57b61ac3f91a960dd7 100644 --- a/script/bundle-windows.ps1 +++ b/script/bundle-windows.ps1 @@ -150,7 +150,7 @@ function CollectFiles { Move-Item -Path "$innoDir\zed_explorer_command_injector.appx" -Destination "$innoDir\appx\zed_explorer_command_injector.appx" -Force Move-Item -Path "$innoDir\zed_explorer_command_injector.dll" -Destination "$innoDir\appx\zed_explorer_command_injector.dll" -Force Move-Item -Path "$innoDir\cli.exe" -Destination "$innoDir\bin\zed.exe" -Force - Move-Item -Path "$innoDir\zed-wsl" -Destination "$innoDir\bin\zed" -Force + Move-Item -Path "$innoDir\zed.sh" -Destination "$innoDir\bin\zed" -Force Move-Item -Path "$innoDir\auto_update_helper.exe" -Destination "$innoDir\tools\auto_update_helper.exe" -Force Move-Item -Path ".\AGS_SDK-6.3.0\ags_lib\lib\amd_ags_x64.dll" -Destination "$innoDir\amd_ags_x64.dll" -Force }