You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Piping the output of rbw list to head results in a panic:
$ rbw list | head -n 1
<first entry>
thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:935:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Piping it into tail doesn't produce a panic, probably due to the pipe being closed after instead of before rbw is done writing to it.
I haven't looked into it much, but this instance of the panic seems to be cause by the following println! macro call:
Piping stdout to something like `head`, which closes rbw's stdout before
it's done writing everything, causes a panic.
The panic is circumvented by using `writeln!` instead of `println!` and
ignoring the error when it's of kind `BrokenPipe`.
Closesdoy#79
Piping the output of
rbw list
tohead
results in a panic:Piping it into
tail
doesn't produce a panic, probably due to the pipe being closed after instead of beforerbw
is done writing to it.I haven't looked into it much, but this instance of the panic seems to be cause by the following
println!
macro call:rbw/src/bin/rbw/commands.rs
Line 533 in 94a0009
A fix would be to replace this with a
write!
, which returns an error that can be handled.If a fix is desired I might have time to look into it.
The text was updated successfully, but these errors were encountered: