From 8b89575bbb648499409fe586cd47498b6364fefc Mon Sep 17 00:00:00 2001 From: Kelin Date: Thu, 29 Jan 2026 22:41:25 -0500 Subject: [PATCH] Fix pre-deployment wizard execution and return handling - Changed menu to run wizard as subprocess instead of exec - Removed wizard's exec of menu since it now returns naturally - Wizard now properly returns to menu on completion or error - Prevents terminal freezing when wizard crashes --- scripts/enhanced-setup/menu.sh | 8 ++++++-- scripts/enhanced-setup/pre-deployment-wizard.sh | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/enhanced-setup/menu.sh b/scripts/enhanced-setup/menu.sh index acda181..5a537c9 100755 --- a/scripts/enhanced-setup/menu.sh +++ b/scripts/enhanced-setup/menu.sh @@ -254,10 +254,14 @@ handle_config_menu() { case "$choice" in 1) print_info "Starting interactive pre-deployment wizard..." - print_info "The menu will exit to allow the wizard to run. The menu will restart after completion." + print_info "The wizard will run and return to this menu when complete." echo read -rp "Press Enter to continue..." - exec ./pre-deployment-wizard.sh + if ./pre-deployment-wizard.sh; then + print_success "Pre-deployment wizard completed successfully" + else + print_error "Pre-deployment wizard exited with an error" + fi ;; 2) print_info "Localizing configuration templates..." diff --git a/scripts/enhanced-setup/pre-deployment-wizard.sh b/scripts/enhanced-setup/pre-deployment-wizard.sh index e62812f..e230964 100755 --- a/scripts/enhanced-setup/pre-deployment-wizard.sh +++ b/scripts/enhanced-setup/pre-deployment-wizard.sh @@ -365,6 +365,9 @@ main() { print_info "3. Run: ./localize.sh" print_info "4. Run: ./deploy.sh core" + echo "" + print_info "Returning to EZ-Homelab menu..." + exit 0 }