-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
EOF must be sent twice on stdin if no other input is sent #477
Comments
Hm, interesting. Thank you very much for reporting this. I guess this is related to the first-line syntax detection. |
I have found and resolved issue locally. However, I am not sure how to exit immeditately as process::exit(0) will exit immediately and not do any destructuring, etc... Other two options are 1) Wrap new function in a result, which seems idiomatic, but would require a lot of downstream changes I am sure. 2) Wrap in a new ContentType that would basically get passed on and ignored at some future point. Would like your thoughts... |
Sorry, just saw this referenced already. :) Will put some comments on pull request. |
closed via #492 by @reidwagner |
Fixed in v0.10.0. |
This has been closed - but there was a change in expected behavior, where we no longer get a header and footer for empty input files. Trying to bring back that behavior while keeping the error logic here seemed to get complex. I think I have a simpler solution all around. Instead of what's implemented in #492 (that could be reverted), we simply don't call
I think maybe the check that |
Sounds great!
I can't tell, at the moment. We have to make sure to correctly handle (1) empty files (2) files with a single line (3) files with a single line and no Edit: I have added some additional tests in #502 (not 100% related to this issue) |
If you run
bat
and then immediately press the EOF sequence (Ctrl-D), bat prints the filename 'STDIN' but continues to read from it. You have to press it again to actually close the file.The text was updated successfully, but these errors were encountered: