Files
oak-gpui/crates/zed/resources/windows/zed.sh
T
Jakub Konka 3d37611b6f 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
2025-09-05 17:43:39 +02:00

26 lines
493 B
Bash

#!/usr/bin/env sh
if [ "$ZED_WSL_DEBUG_INFO" = true ]; then
set -x
fi
ZED_PATH="$(dirname "$(realpath "$0")")"
IN_WSL=false
if [ -n "$WSL_DISTRO_NAME" ]; then
# $WSL_DISTRO_NAME is available since WSL builds 18362, also for WSL2
IN_WSL=true
fi
if [ $IN_WSL = true ]; then
WSL_USER="$USER"
if [ -z "$WSL_USER" ]; then
WSL_USER="$USERNAME"
fi
"$ZED_PATH/zed.exe" --wsl "$WSL_USER@$WSL_DISTRO_NAME" "$@"
exit $?
else
"$ZED_PATH/zed.exe" "$@"
exit $?
fi