mgdm / htmlq

Like jq, but for HTML.
MIT License
7.09k stars 111 forks source link

Broken pipe error #27

Open honzajde opened 3 years ago

honzajde commented 3 years ago

This is ok: cat article.html | htmlq --pretty 'main' | head -30

This is not: cat article.html | htmlq --pretty 'main *:not(a)' | head -30 Error: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }

0mp commented 2 years ago

I'm experiencing a similar error on FreeBSD 14.0-CURRENT:

$ cat ./article.html | htmlq "section a img" -a src | head -n 1
https://example.org
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', src/main.rs:85:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

htmlq version: htmlq-0.3.0_1, built with rust-1.56.0.

pbsds commented 2 years ago

It should be safe to simply silence this once specific error