refactor(wsl): 统一 WSL 检测方式为 WSLInterop 文件检查

This commit is contained in:
2026-03-26 19:23:56 +08:00
parent bd04de439c
commit 769ca0a44b
+1 -1
View File
@@ -6,7 +6,7 @@ if [ "$(id -u)" -ne 0 ]; then
exit 1 exit 1
fi fi
if ! grep -qiE '(microsoft|wsl)' /proc/sys/kernel/osrelease 2>/dev/null; then if [[ ! -f /proc/sys/fs/binfmt_misc/WSLInterop ]]; then
echo "此脚本仅用于 Arch Linux on WSL 的首次初始化" echo "此脚本仅用于 Arch Linux on WSL 的首次初始化"
exit 1 exit 1
fi fi