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

fix(dev build): reserving unused port #26 #30

Merged
merged 4 commits into from
Apr 15, 2018

Conversation

FadySamirSadek
Copy link
Contributor

No description provided.

Copy link
Contributor

@egoist egoist left a comment

Choose a reason for hiding this comment

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

Maybe log some warning when the port is changed

lib/dev.js Outdated
portfinder.basePort = cliOptions.port || options.siteConfig.port || 8080
const port = await portfinder.getPortPromise()
.then((port) => {
return port
Copy link
Member

Choose a reason for hiding this comment

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

.then here can be removed if you only want to get the available port.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ulivz Thanks!!
completely missed it , will fix it now.

Copy link
Contributor

@egoist egoist left a comment

Choose a reason for hiding this comment

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

no need of .catch too

lib/dev.js Outdated
const port = cliOptions.port || options.siteConfig.port || 8080
portfinder.basePort = cliOptions.port || options.siteConfig.port || 8080
const port = await portfinder.getPortPromise()
.catch(err => console.log(err))
Copy link
Member

Choose a reason for hiding this comment

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

no need to catch here, this should propagate up the call stack and be logged anyway.

@ulivz ulivz mentioned this pull request Apr 15, 2018
@yyx990803 yyx990803 merged commit f2a8229 into vuejs:master Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants