]> arthur.barton.de Git - pdfman.git/commitdiff
Suppress errors of the "man --version" command main
authorAlexander Barton <alex@barton.de>
Mon, 27 May 2024 19:28:24 +0000 (21:28 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 27 May 2024 19:28:24 +0000 (21:28 +0200)
The man(1) command on macOS does not support any version output at
all, for example.

pdfman

diff --git a/pdfman b/pdfman
index 0803f009231442f9811dbf8818169ae0095cd7f6..8ded8eda1150af8f45550d013fbf3a5d8dff101c 100755 (executable)
--- a/pdfman
+++ b/pdfman
@@ -48,7 +48,7 @@ while [[ $# -gt 0 ]]; do
                        ;;
                "--version")
                        echo "pdfman, version 1" >&2
-                       man --version
+                       man --version 2>/dev/null
                        exit 2
                        ;;
                -*)