[packages/rpm-build-tools] rust-crates: fix error message on unknown argument

atler atler at pld-linux.org
Sat Sep 3 12:58:13 CEST 2022


commit 20089c92c54f915ac6fb99f235dfc7e9f14db94c
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Sep 3 12:46:12 2022 +0200

    rust-crates: fix error message on unknown argument

 rust-crates.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rust-crates.sh b/rust-crates.sh
index f5c5a32..8e245bc 100755
--- a/rust-crates.sh
+++ b/rust-crates.sh
@@ -23,7 +23,7 @@ if [ -n "$not_installed" ]; then
   exit 1
 fi
 
-while getopts p:o:fvh OPTNAME; do
+while getopts :p:o:fvh OPTNAME; do
   case $OPTNAME in
     p)
       force_cargo_package="$OPTARG"
@@ -42,7 +42,7 @@ while getopts p:o:fvh OPTNAME; do
       exit 0
       ;;
     ?)
-      echo "ERROR: unknown option '-$OPTNAME'" >&2
+      echo "ERROR: unknown option '-$OPTARG'" >&2
       usage
       exit 1
       ;;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/be8646847d29eb21b6b75a40870e3bcf85455c00



More information about the pld-cvs-commit mailing list