Repository navigation
fix(cli): prevent serve crash when port is free on macOS - #14812
Merged
diegosouzapw merged 3 commits intoSep 29, 2026
Merged
diegosouzapw merged 3 commits into
diegosouzapw merged 3 commits into
Conversation
prabhtheone
marked this pull request as ready for review
September 24, 2026 22:16
Owner
|
Thanks for chasing #14800 — the exit-code-1-with-empty-stdout case is the real macOS trigger and your test fails without the fix, passes with it. One more piece is needed though: in |
…s null Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
4 of 5 tasks
diegosouzapw
merged commit Sep 29, 2026
8183e9b
into
diegosouzapw:release/v3.8.51
10 of 16 checks passed
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #14800.
On macOS,
omniroute servecould crash when the requested port was free.lsof -ti :PORTexits with code1and empty output when no process islistening, which was incorrectly treated as an unavailable discovery result.
This caused the serve preflight to reach a
nullvalue and crash whenaccessing
.length.Changes
lsofexit code1with empty output as an empty PID list.nullfor genuine port-discovery failures.lsofno-match case.Testing
Added a regression test covering:
lsofreturning exit code1with empty output.Related Issue
Closes #14800