Fix: empty Enter on VM selection crashes due to set -u (unset variable)
Added || true on read and ${:-} default expansion to handle empty input safely.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -435,10 +435,10 @@ PYEOF
|
||||
print_ok "VM 백업 자동 선택: $TEMPLATE_VMID"
|
||||
else
|
||||
echo -ne "${CYAN}복원할 VM 백업 ID (숫자, Enter로 건너뛰기): ${NC}"
|
||||
read -r TEMPLATE_VMID </dev/tty
|
||||
read -r TEMPLATE_VMID </dev/tty || true
|
||||
fi
|
||||
|
||||
if [ -z "$TEMPLATE_VMID" ]; then
|
||||
if [ -z "${TEMPLATE_VMID:-}" ]; then
|
||||
print_warn "VM 복원을 건너뜁니다."
|
||||
VM_VMID=""
|
||||
print_ok "Phase 4 완료: PBS 등록됨 (VM 복원 스킵)"
|
||||
|
||||
Reference in New Issue
Block a user