summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-11-02 10:35:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-11-02 10:35:26 -0700
commit3acc9d6f25e716af0edee5721ba33e87da802bf7 (patch)
tree865a0724f50550e287616034b00a741862e98a87
parentcf64deb422f0835c3062c0084d6b23799b21375d (diff)
downloadgzip-3acc9d6f25e716af0edee5721ba33e87da802bf7.tar.gz
* gzip.c (treat_stdin): If quiet, be quiet with plain gzip -q.
Problem reported by Michaƫl Guitton in <http://lists.gnu.org/archive/html/bug-gzip/2011-11/msg00000.html>.
-rw-r--r--gzip.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gzip.c b/gzip.c
index 6164438..cb10a23 100644
--- a/gzip.c
+++ b/gzip.c
@@ -617,11 +617,15 @@ local void treat_stdin()
*
* Here we use the --force option to get the other behavior.
*/
- fprintf(stderr,
- "%s: compressed data not %s a terminal. Use -f to force %scompression.\n",
- program_name, decompress ? "read from" : "written to",
- decompress ? "de" : "");
- fprintf (stderr, "For help, type: %s -h\n", program_name);
+ if (! quiet)
+ fprintf (stderr,
+ ("%s: compressed data not %s a terminal."
+ " Use -f to force %scompression.\n"
+ "For help, type: %s -h\n"),
+ program_name,
+ decompress ? "read from" : "written to",
+ decompress ? "de" : "",
+ program_name);
do_exit(ERROR);
}