diff --git a/scripts/reload.sh b/scripts/reload.sh index 3cd2bb63..43a58863 100755 --- a/scripts/reload.sh +++ b/scripts/reload.sh @@ -318,14 +318,13 @@ OPEN_CLEAN_ENV=( if [[ -n "${TAG_SLUG:-}" && -n "${CMUX_SOCKET:-}" ]]; then # Ensure tag-specific socket paths win even if the caller has CMUX_* overrides. - "${OPEN_CLEAN_ENV[@]}" CMUX_TAG="$TAG_SLUG" CMUX_SOCKET_PATH="$CMUX_SOCKET" CMUXD_UNIX_PATH="$CMUXD_SOCKET" CMUX_DEBUG_LOG="$CMUX_DEBUG_LOG" open "$APP_PATH" + "${OPEN_CLEAN_ENV[@]}" CMUX_TAG="$TAG_SLUG" CMUX_SOCKET_PATH="$CMUX_SOCKET" CMUXD_UNIX_PATH="$CMUXD_SOCKET" CMUX_DEBUG_LOG="$CMUX_DEBUG_LOG" open -g "$APP_PATH" elif [[ -n "${TAG_SLUG:-}" ]]; then - "${OPEN_CLEAN_ENV[@]}" CMUX_TAG="$TAG_SLUG" CMUX_DEBUG_LOG="$CMUX_DEBUG_LOG" open "$APP_PATH" + "${OPEN_CLEAN_ENV[@]}" CMUX_TAG="$TAG_SLUG" CMUX_DEBUG_LOG="$CMUX_DEBUG_LOG" open -g "$APP_PATH" else echo "/tmp/cmux-debug.log" > /tmp/cmux-last-debug-log-path || true - "${OPEN_CLEAN_ENV[@]}" open "$APP_PATH" + "${OPEN_CLEAN_ENV[@]}" open -g "$APP_PATH" fi -osascript -e "tell application id \"${BUNDLE_ID}\" to activate" || true # Safety: ensure only one instance is running. sleep 0.2 diff --git a/scripts/reloadp.sh b/scripts/reloadp.sh index fbb75fe8..62bc0597 100755 --- a/scripts/reloadp.sh +++ b/scripts/reloadp.sh @@ -17,5 +17,4 @@ if [[ -z "${APP_PATH}" ]]; then fi # 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 "$APP_PATH" -osascript -e 'tell application "cmux" to activate' || true +env -u GIT_PAGER -u GH_PAGER open -g "$APP_PATH" diff --git a/scripts/reloads.sh b/scripts/reloads.sh index f2c2dfad..f06bc246 100755 --- a/scripts/reloads.sh +++ b/scripts/reloads.sh @@ -251,8 +251,7 @@ OPEN_CLEAN_ENV=( # Always inject staging socket paths via env to ensure they take effect # (LSEnvironment requires app restart to pick up plist changes). -"${OPEN_CLEAN_ENV[@]}" CMUX_SOCKET_PATH="$CMUX_SOCKET" CMUXD_UNIX_PATH="$CMUXD_SOCKET" open "$APP_PATH" -osascript -e "tell application id \"${BUNDLE_ID}\" to activate" || true +"${OPEN_CLEAN_ENV[@]}" CMUX_SOCKET_PATH="$CMUX_SOCKET" CMUXD_UNIX_PATH="$CMUXD_SOCKET" open -g "$APP_PATH" # Safety: ensure only one instance is running. sleep 0.2