Fix tail path in script/macos/run --open_with_launchd for OSS channel#10140
Fix tail path in script/macos/run --open_with_launchd for OSS channel#10140sebryu wants to merge 2 commits intowarpdotdev:masterfrom
tail path in script/macos/run --open_with_launchd for OSS channel#10140Conversation
The script hardcoded `tail -f ~/Library/Logs/warp_local.log`, which only exists for the internal local channel. External contributors who build the OSS channel got `tail: ... No such file or directory` even though the app launched successfully. Branch on $WARP_CHANNEL so OSS tails warp-oss.log (verified in app/src/bin/oss.rs) and the local channel keeps its existing path. Also use `tail -F` so the tail survives the brief window before launchd creates the log file.
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates script/macos/run --open_with_launchd to tail the OSS log file for OSS builds while preserving the existing local-channel log path, and switches to tail -F so tailing survives log creation/rotation.
Concerns
- No correctness or security concerns found in the changed lines.
- The changed path only matches the catch-all stakeholder team in
.github/STAKEHOLDERS; no single eligible human reviewer could be identified from the provided rules.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| tail -f ~/Library/Logs/warp_local.log | ||
| if [ "$WARP_CHANNEL" = "local" ]; then | ||
| LOG_FILE=~/Library/Logs/warp_local.log | ||
| else |
There was a problem hiding this comment.
I would prefer we elif here and be specific about the OSS channel, and in the else case log a warning that the channel is unrecognized
There was a problem hiding this comment.
Done in 679b8cb — added an explicit elif for oss and a warning on unrecognized channels.
Match `oss` explicitly and warn on unrecognized channels instead of silently using the OSS log path. Addresses review feedback on warpdotdev#10140.
Summary
./script/run --open_with_launchd(macOS, OSS channel) ends with:The script hardcodes
tail -f ~/Library/Logs/warp_local.log, but the OSS binary writes to~/Library/Logs/warp-oss.log(seeapp/src/bin/oss.rs—logfile_name: "warp-oss.log"). External contributors who can't installwarp-channel-configalways build the OSS channel and so always hit this.This branches on
$WARP_CHANNELso:~/Library/Logs/warp-oss.log(verified path).~/Library/Logs/warp_local.log(unchanged — local channellogfile_namelives in the closedwarp-channel-configrepo, so I didn't touch it).Also swaps
tail -f→tail -Fso the tail survives the brief window before launchd has created the log file.Test plan
./script/run --open_with_launchdon OSS channel → app launches andwarp-oss.logis tailed correctly../script/run --open_with_launchdon local channel → unchanged behavior, still tailswarp_local.log.