Studio: Refactor windows port checker to use portFinder helpers - #1281
Merged
Conversation
1 task
fredrikekelund
approved these changes
Apr 28, 2025
fredrikekelund
left a comment
Contributor
There was a problem hiding this comment.
Elegant and works as expected 👍
Not directly related to this PR, but I noticed this error message:
Studio needs to use port 80 and 443 to enable custom domains and SSL, but one of both of these ports are already in use by another app. Close any local development apps and restart Studio.
I would remove "of both" from that message to make it sound more idiomatic. I.e., it would read:
Studio needs to use port 80 and 443 to enable custom domains and SSL, but one of these ports are already in use by another app. Close any local development apps and restart Studio.
gavande1
force-pushed
the
stu-103-refactor-windows-port-check
branch
from
April 28, 2025 09:16
69f3cad to
a0f509d
Compare
fredrikekelund
approved these changes
Apr 28, 2025
fredrikekelund
left a comment
Contributor
There was a problem hiding this comment.
LGTM with two nits 👍
Co-authored-by: Fredrik Rombach Ekelund <fredrik@f26d.dev>
Co-authored-by: Fredrik Rombach Ekelund <fredrik@f26d.dev>
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.
Related issues
Note
We also have checkPortInWindows in src/lib/proxy-server.ts. There's an obvious difference in that the checkPortInWindows function only runs on Windows, but I still wonder if we shouldn't refactor that function and PortFinder::isPortFree to share the same underlying logic.
Proposed Changes
portFinderhelpersTesting Instructions
Ctrl+Cin the terminal).Ctrl+Cin the other terminal).Pre-merge Checklist