Parchive / par2cmdline

Official repo for par2cmdline and libpar2
http://parchive.sourceforge.net
GNU General Public License v2.0
726 stars 75 forks source link

fix: enforce -qq silent #148

Closed jaki closed 3 years ago

jaki commented 4 years ago

Enforce that the -qq silent noise level is truly silent (i.e. gives no output). Fix it for create. Add a test test28 to ensure it for create, verify, and repair.

mdnahas commented 4 years ago

Uh, why should -qq produce no output? If you want no output from a command, you don't do anything to the commandline, you just ignore the output. Or is there a case I'm not thinking of?

mkruer commented 4 years ago

Probably should adopt apt-get style of quiet quiet, -qq No output except for errors anything more and the script should be directing to 2>/dev/null

jaki commented 4 years ago

@mdnahas, create -qq outputs a newline, and I removed it (see commit message of 7c8df0f). Do you know of any cases where the -qq rightfully outputs to stdout? If not, it would be nice to make it behave that way.

@mkruer, the test only captures stdout, and I mention why in the commit message of 48601d1. 2>/dev/null is not necessary in the test script for correctness, so are you suggesting it for a cleaner test28.log? Please clarify. I can also add a test case with a command that errors with output to stderr but still passes because stdout is clean.

mkruer commented 4 years ago

@jj-kim I was responding to @mdnahas "why should -qq produce no output?" If we go by the sudo standard of some other programs, -qq should not produce anything for standard out (stdout). However standard errors (stderr) should still be produced. This could be added as a negative testcase where you purposefully fail the test, and check to see if the stderr is produced, and if it is, it passes.

jaki commented 4 years ago

That makes more sense. I can add a negative test case.

jaki commented 4 years ago

Can this get merged? It's been several months. Same for the other PR #149.

mdnahas commented 3 years ago

Looks find to me.