Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fall back to a random port if preferred port is privileged #39

Merged
merged 3 commits into from Dec 18, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test.js
Expand Up @@ -32,7 +32,7 @@ test('preferred port unavailable', async t => {
t.not(port, desiredPort);
});

test('preferred port priviliged', async t => {
test('preferred port privileged', async t => {
Copy link
Contributor Author

@mjgallag mjgallag Dec 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks for catching this typo @sindresorhus, and thanks for the quick merge!

const desiredPort = 80;
const port = await getPort({host: '127.0.0.1', port: desiredPort});

Expand Down