]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
rust-crates: fix error message on unknown argument
authorJan Palus <atler@pld-linux.org>
Sat, 3 Sep 2022 10:46:12 +0000 (12:46 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 3 Sep 2022 10:46:12 +0000 (12:46 +0200)
rust-crates.sh

index f5c5a3206e5ffb636e000c0c2aa8711d9bbd033b..8e245bcc82f9271bc43354e19bbe6551e0f04e36 100755 (executable)
@@ -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
       ;;
This page took 0.069296 seconds and 4 git commands to generate.