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

Don't freeze if path doesn't exist #132

Merged
merged 11 commits into from
Mar 12, 2017
Merged

Don't freeze if path doesn't exist #132

merged 11 commits into from
Mar 12, 2017

Conversation

AndyBitz
Copy link
Contributor

@AndyBitz AndyBitz commented Mar 11, 2017

This closes #131.

yield pathType.dir(current) and pathType.dirSync(current) just return on SIGINT .
fs.existsSync should be more reliable.

@floatdrop
Copy link
Contributor

@AndyBitz path-type also used in lib/render.js and lib/server.js. Should it be replaced there too (and removed from package.json)?

@AndyBitz
Copy link
Contributor Author

@floatdrop I tried to change it there too. It didn't work as expected.
Also I figured that fs.existsSync doesn't check if it is a directory or not, so I changed it to lstatSync .

@leo leo changed the title fixed issue#131 bad dir freez Don't freeze if path doesn't exist Mar 12, 2017
@leo leo merged commit c639bf6 into vercel:master Mar 12, 2017
@leo
Copy link
Contributor

leo commented Mar 12, 2017

Thanks a lot! 😏

@leo leo mentioned this pull request Mar 12, 2017
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.

serve -s [bad dir] freezes
3 participants