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

uglifyjs binary: Make read_whole_file async and don't attempt to read STDIN synchronously #174

Closed

Conversation

papandreou
Copy link
Contributor

The weird do {...fs.readFileSync("/dev/stdin", "utf8");} while (...) construct is causing the uglifyjs binary to behave a bit odd. Eg. on my Ubuntu 12.12 I need to hit ^D twice when ending the input.

I've looked around a bit, and it doesn't seem like there's a reliable way to slurp stdin synchronously in node.js, so I tried to make read_whole_file asynchronous, which resolves the problems I've had.

@mishoo
Copy link
Owner

mishoo commented Mar 31, 2013

Oh my God, such mess for a single async function! :-)

Thanks for the patch, I merged it. For some reason this pull request didn't close automatically.

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.

2 participants