fix(script): fix match '~' to avoid expansion

This commit is contained in:
Fodesu
2026-03-17 02:10:44 +08:00
committed by 晨苒
parent 49bc2c868b
commit 30a2d2dfff
+2 -2
View File
@@ -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