From 336c5d2ec65ff86f3853c88d434df2aff0a8e36f Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Wed, 8 Jul 2026 01:59:29 +0000 Subject: [PATCH] Sync build v0.9.333 Automated sync from private repository. Commit: 7f9ffb1a422d670468301ba067ded244b795c22c --- manage.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/manage.sh b/manage.sh index b406c43d..170f79ec 100755 --- a/manage.sh +++ b/manage.sh @@ -384,17 +384,11 @@ do_upgrade() { print_banner echo -e " ${DIM}Mode: Upgrade Console${NC}" echo "" - if ! preflight_check; then - print_repeater_missing_help - return 1 - fi - if ! console_installed; then - print_error "Console is not installed. Run: sudo $0 install" - return 1 - fi - - # Self-update pymc_console repo and re-exec. + # Self-update pymc_console repo and re-exec. This must run before any + # other checks: preflight_check() and console_installed() below are part + # of this same script, so if SCRIPT_DIR is stale, their results (and + # everything else in this run) can't be trusted until we're current. # NOTE: this must run in the parent process (no subshell) so that `exec` # replaces the running manage.sh instead of just a subshell. if [[ -d "$SCRIPT_DIR/.git" ]]; then @@ -415,6 +409,16 @@ do_upgrade() { fi fi + if ! preflight_check; then + print_repeater_missing_help + return 1 + fi + + if ! console_installed; then + print_error "Console is not installed. Run: sudo $0 install" + return 1 + fi + local ui_before ui_after ui_before=$(get_console_version)