mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 12:32:06 +08:00
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
This commit is contained in:
parent
2cc9adf8b8
commit
4407650e67
@ -544,7 +544,7 @@ restore_feature() {
|
|||||||
if [ ! -e "$BACKUP_DIR"/*.backup_* ]; then
|
if [ ! -e "$BACKUP_DIR"/*.backup_* ]; then
|
||||||
log_warn "未找到任何备份文件"
|
log_warn "未找到任何备份文件"
|
||||||
return
|
return
|
||||||
}
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
log_info "可用的备份文件:"
|
log_info "可用的备份文件:"
|
||||||
@ -569,7 +569,7 @@ restore_feature() {
|
|||||||
if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -ge "$i" ]; then
|
if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -ge "$i" ]; then
|
||||||
log_error "无效的选择"
|
log_error "无效的选择"
|
||||||
return
|
return
|
||||||
}
|
fi
|
||||||
|
|
||||||
# 获取选择的备份文件
|
# 获取选择的备份文件
|
||||||
local selected_backup="${backup_files[$((choice-1))]}"
|
local selected_backup="${backup_files[$((choice-1))]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user