-
Notifications
You must be signed in to change notification settings - Fork 13
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
bkt: stdout pipe failed: failed to write whole buffer #44
Comments
Thanks for the report! 0.7.0 was just released so this is likely a regression (i.e. you can workaround via 0.6.1 in the meantime), I'll see if I can reproduce and fix. For reference, the error message is coming from |
DisregardBrokenPipe needs to implement write_all() as well as write() because the former treats a 0-byte write as an error, whereas DPB should no-op in that scenario. Note that this is fix is in main.rs and therefore _only_ fixes the CLI. Along with the existing TODO on DPB it may be preferable to stop using write_all() in lib.rs, but for now I'm erring on the side of letting library users handle failures themselves. Fixes #44
@agostonbarna would you mind trying out these binaries and confirming the issue is resolved on your end? I'll cut a 0.7.1 as soon as I hear from you. |
Hey @dimo414 , |
Thanks for confirming! |
Hi,
I recently ran into an error with bkt:
This only seem to happen with many files/lines, but I don't get the error when piping the stdout to
wc -l
, so maybe the issue only happens when the process on the right side of the pipe closes the stdout of the bkt process before it could write out it's whole output (e.g.head
,fzf
).The stdout is actually correct in both cases so it sounds like this bkt error is not really necessary to show to the user.
Reproduced with:
cargo install bkt
)The text was updated successfully, but these errors were encountered: