From 4407650e671b2a00d823727c6480881a7a5e6fe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=85=8E=E9=A5=BC=E6=9E=9C=E5=AD=90=E5=8D=B7=E9=B2=A8?= =?UTF-8?q?=E9=B1=BC=E8=BE=A3=E6=A4=92?= Date: Sat, 8 Feb 2025 10:15:31 +0800 Subject: [PATCH] fix: Correct syntax errors in restore feature function - Fixed missing `fi` statements in conditional blocks - Resolved potential shell script syntax issues in `restore_feature()` - Ensured proper control flow and error handling in backup restoration logic --- scripts/run/cursor_mac_id_modifier.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run/cursor_mac_id_modifier.sh b/scripts/run/cursor_mac_id_modifier.sh index 1eb9131..f330f23 100644 --- a/scripts/run/cursor_mac_id_modifier.sh +++ b/scripts/run/cursor_mac_id_modifier.sh @@ -544,7 +544,7 @@ restore_feature() { if [ ! -e "$BACKUP_DIR"/*.backup_* ]; then log_warn "未找到任何备份文件" return - } + fi echo log_info "可用的备份文件:" @@ -569,7 +569,7 @@ restore_feature() { if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -ge "$i" ]; then log_error "无效的选择" return - } + fi # 获取选择的备份文件 local selected_backup="${backup_files[$((choice-1))]}"