From e55108b8889a9b0cfe3edd0108c5a2c7132b4642 Mon Sep 17 00:00:00 2001 From: Gale W Date: Wed, 18 Mar 2026 13:16:05 -0400 Subject: [PATCH 1/2] Make release reload report launch status --- scripts/reloadp.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/reloadp.sh b/scripts/reloadp.sh index 62bc0597..a046b718 100755 --- a/scripts/reloadp.sh +++ b/scripts/reloadp.sh @@ -15,6 +15,20 @@ if [[ -z "${APP_PATH}" ]]; then echo "cmux.app not found in DerivedData" >&2 exit 1 fi + +echo "Release app:" +echo " ${APP_PATH}" + # Dev shells (including CI/Codex) often force-disable paging by exporting these. # Don't leak that into cmux, otherwise `git diff` won't page even with PAGER=less. env -u GIT_PAGER -u GH_PAGER open -g "$APP_PATH" + +sleep 1 +APP_PROCESS_PATH="${APP_PATH}/Contents/MacOS/cmux" +if ps -ax -o command= | grep -F "$APP_PROCESS_PATH" | grep -v grep >/dev/null 2>&1; then + echo "Release launch status:" + echo " running: ${APP_PROCESS_PATH}" +else + echo "warning: Release app launch was requested, but no running process was observed for:" >&2 + echo " ${APP_PROCESS_PATH}" >&2 +fi From f6d2b1e172a45c99a056ecea059ec7684638a0e9 Mon Sep 17 00:00:00 2001 From: Gale W Date: Wed, 18 Mar 2026 15:03:11 -0400 Subject: [PATCH 2/2] Poll release launch status before warning --- scripts/reloadp.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/reloadp.sh b/scripts/reloadp.sh index a046b718..943c0745 100755 --- a/scripts/reloadp.sh +++ b/scripts/reloadp.sh @@ -23,12 +23,18 @@ echo " ${APP_PATH}" # Don't leak that into cmux, otherwise `git diff` won't page even with PAGER=less. env -u GIT_PAGER -u GH_PAGER open -g "$APP_PATH" -sleep 1 APP_PROCESS_PATH="${APP_PATH}/Contents/MacOS/cmux" -if ps -ax -o command= | grep -F "$APP_PROCESS_PATH" | grep -v grep >/dev/null 2>&1; then - echo "Release launch status:" - echo " running: ${APP_PROCESS_PATH}" -else - echo "warning: Release app launch was requested, but no running process was observed for:" >&2 - echo " ${APP_PROCESS_PATH}" >&2 -fi +ATTEMPT=0 +MAX_ATTEMPTS=20 +while [[ "$ATTEMPT" -lt "$MAX_ATTEMPTS" ]]; do + if pgrep -f "$APP_PROCESS_PATH" >/dev/null 2>&1; then + echo "Release launch status:" + echo " running: ${APP_PROCESS_PATH}" + exit 0 + fi + ATTEMPT=$((ATTEMPT + 1)) + sleep 0.25 +done + +echo "warning: Release app launch was requested, but no running process was observed for:" >&2 +echo " ${APP_PROCESS_PATH}" >&2