diff --git a/bin/test-installer-ui-flow b/bin/test-installer-ui-flow index b4b337e..5bf419f 100755 --- a/bin/test-installer-ui-flow +++ b/bin/test-installer-ui-flow @@ -132,6 +132,8 @@ if [[ $fail_status -ne 7 ]]; then echo "Expected failure worker status 7, got $fail_status" >&2 exit 1 fi +assert_contains "$fail_log" "[dashboard] installer child exited with status 7" +assert_contains "$fail_log" "[dashboard] last installer phase: Installing Arch + Omarchy" assert_not_contains "$fail_capture" "Installed in" assert_not_contains "$fail_capture" "Finished installing" diff --git a/configs/airootfs/usr/local/bin/omarchy-install-dashboard b/configs/airootfs/usr/local/bin/omarchy-install-dashboard index f21bca4..22a96fb 100755 --- a/configs/airootfs/usr/local/bin/omarchy-install-dashboard +++ b/configs/airootfs/usr/local/bin/omarchy-install-dashboard @@ -332,12 +332,37 @@ set -e child_pid="" child_pgid="" +echo "[dashboard] installer child exited with status $status" >>"$LOG_FILE" + if (( status != 0 )); then + if [[ -f $STATE_FILE ]]; then + python - "$STATE_FILE" >>"$LOG_FILE" <<'PY' 2>/dev/null || true +import json, sys +try: + state = json.load(open(sys.argv[1])) +except Exception: + raise SystemExit(0) +phase = state.get("current_phase") +if phase: + print(f"[dashboard] last installer phase: {phase}") +PY + fi printf '%s%s' "$SHOW_CURSOR" "$CLEAR" >"$TTY_PATH" exit "$status" fi +set +e render_finish +finish_render_status=$? +set -e +if (( finish_render_status != 0 )); then + echo "[dashboard] finish screen render failed with status $finish_render_status; using fallback" >>"$LOG_FILE" + { + printf '%s%s' "$SHOW_CURSOR" "$CLEAR" + printf '\nFinished installing\n\n' + } >"$TTY_PATH" 2>/dev/null || true +fi + if [[ ${OMARCHY_UI_AUTO_REBOOT:-} == "no" ]]; then exit 0 fi