From c54bf37113ff181f855ce6d0627a6b7320c9ffed Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Wed, 17 Jun 2026 19:59:49 +0800 Subject: [PATCH] fix(setup): prevent offline bootstrap from intercepting sync/backup/restore subcommands The try_bootstrap_from_offline_package call at line 2138 ran before subcommand routing (sync/backup/restore/migrate/uninstall) at line 2357+, causing those subcommands to be silently consumed by the offline bootstrap early-exit path. Added a case guard to skip the offline bootstrap when a recognized subcommand is provided as $1. --- scripts/setup-ai-workspace-all-in-one.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/setup-ai-workspace-all-in-one.sh b/scripts/setup-ai-workspace-all-in-one.sh index 49168f0..a027bee 100755 --- a/scripts/setup-ai-workspace-all-in-one.sh +++ b/scripts/setup-ai-workspace-all-in-one.sh @@ -2135,9 +2135,15 @@ if [ "$OS_NAME" = "linux" ]; then acquire_deployment_lock wait_for_apt_locks ensure_public_edge_firewall_ports - if try_bootstrap_from_offline_package; then - exit 0 - fi + # Skip offline bootstrap when running a subcommand that handles its own flow + case "${1:-}" in + sync|uninstall|backup|restore|migrate) ;; + *) + if try_bootstrap_from_offline_package; then + exit 0 + fi + ;; + esac fi if ! command -v ansible-playbook >/dev/null 2>&1 || ! command -v git >/dev/null 2>&1; then