nlfiedler / exaf-rs

EXtensible Archiver Format
MIT License
0 stars 0 forks source link

Running list output through head results in a broken pipe error. #1

Open nlfiedler opened 2 months ago

nlfiedler commented 2 months ago

As the description says, running the list command through head results in a broken pipe error.

$ cargo run -- create archive.exa ~/Downloads/httpd-2.4.59
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/exaf-rs create archive.exa /Users/nfiedler/Downloads/httpd-2.4.59`
Added 3138 files to archive.exa
[19:56:05 nfiedler@tampopo ~/projects/exaf-rs ttys003 0 (0)]
$ cargo run -- list archive.exa | head
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s
     Running `target/debug/exaf-rs list archive.exa`
httpd-2.4.59
httpd-2.4.59/modules
httpd-2.4.59/modules/session
httpd-2.4.59/modules/slotmem
httpd-2.4.59/modules/metadata
httpd-2.4.59/modules/dav
httpd-2.4.59/modules/dav/fs
httpd-2.4.59/modules/dav/main
httpd-2.4.59/modules/dav/lock
httpd-2.4.59/modules/generators
thread 'main' panicked at library/std/src/io/stdio.rs:1088:9:
failed printing to stdout: Broken pipe (os error 32)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

There is probably a better way to handle that.