summaryrefslogtreecommitdiff
path: root/zmore.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-11-24 22:34:05 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2017-11-24 22:34:29 -0800
commitef58a957a6c1887930cc70d6199ae7e48aa8d716 (patch)
tree8254f15bbbc5b95cf8af46c9e5412ce92af9b060 /zmore.in
parentb06803378a7fe81e8fd9ec0cfb38c8e304a44b32 (diff)
downloadgzip-ef58a957a6c1887930cc70d6199ae7e48aa8d716.tar.gz
maint: zforce and zmore exit status cleanup
Problem reported by Nelson H. F. Beebe. * zforce.in, zmore.in: On failure, exit with status 1 instead of with whatever failing status that printf or mv exited with.
Diffstat (limited to 'zmore.in')
-rw-r--r--zmore.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/zmore.in b/zmore.in
index 1bd3bdb..b9f0b7d 100644
--- a/zmore.in
+++ b/zmore.in
@@ -31,8 +31,8 @@ Like 'more', but operate on the uncompressed contents of any compressed FILEs.
Report bugs to <bug-gzip@gnu.org>."
case $1 in
- --h*) printf '%s\n' "$usage" ; exit;;
- --v*) printf '%s\n' "$version"; exit;;
+ --h*) printf '%s\n' "$usage" || exit 1; exit;;
+ --v*) printf '%s\n' "$version" || exit 1; exit;;
--) shift;;
-?*) printf >&2 '%s\n' "$0: $1: unknown option; try '$0 --help' for help"
exit 1;;