From 30a2d2dfff06d0d848aec4947542dbc80e24d031 Mon Sep 17 00:00:00 2001 From: Fodesu Date: Tue, 17 Mar 2026 02:10:44 +0800 Subject: [PATCH] fix(script): fix match '~' to avoid expansion --- scripts/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 93d2f807..94ec2619 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -117,8 +117,8 @@ if [ "$SILENT" = false ]; then read -r input < /dev/tty || true if [ -n "$input" ]; then case "$input" in - ~) WORKSPACE="${HOME:-/tmp}" ;; - ~/*) WORKSPACE="${HOME:-/tmp}${input#\~}" ;; + "~") WORKSPACE="${HOME:-/tmp}" ;; + "~"/*) WORKSPACE="${HOME:-/tmp}${input#\~}" ;; *) WORKSPACE="$input" ;; esac fi