Merge pull request #1774 from gaelic-ghost/add/release-script-logs-launch-status
Report release launch status in reloadp.sh
This commit is contained in:
commit
bf1692fc30
1 changed files with 20 additions and 0 deletions
|
|
@ -15,6 +15,26 @@ 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"
|
||||
|
||||
APP_PROCESS_PATH="${APP_PATH}/Contents/MacOS/cmux"
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue