From dc3959fcbd9c527a67a57df041e22cf23db53f41 Mon Sep 17 00:00:00 2001 From: Matt Pearson Date: Sun, 20 Dec 2015 14:14:23 -0800 Subject: [PATCH] Make '-h' exit immediately after printing help info. Without this, the script continues to execute, and we see this error: ``` ./deploy.sh: line 124: [: =: unary operator expected Deploy directory '' does not exist. Aborting. ``` --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index fd0af5b..20fb070 100755 --- a/deploy.sh +++ b/deploy.sh @@ -56,7 +56,7 @@ parse_args() { while : ; do if [[ $1 = "-h" || $1 = "--help" ]]; then echo "$help_message" - return 0 + exit 0 elif [[ $1 = "-v" || $1 = "--verbose" ]]; then verbose=true shift