From 12dc49b60a10a2494c24804f3bed50a36e36fed8 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 23 Oct 2020 00:40:05 +0200 Subject: [PATCH] Make page processor print usage only after reporting all bad opts --- .github/actions/get-pages.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/actions/get-pages.sh b/.github/actions/get-pages.sh index d6031f5e..209c1598 100755 --- a/.github/actions/get-pages.sh +++ b/.github/actions/get-pages.sh @@ -26,14 +26,12 @@ while getopts ":hr" opt; do ;; \?) echo "Unknown option '$OPTARG'" - if [ $bad_usage -eq 0 ]; then - usage - bad_usage=1 - fi + bad_usage=1 ;; esac done if [ $bad_usage -ne 0 ]; then + usage exit 1 fi shift $(($OPTIND - 1))