Skip to content

Commit

Permalink
fix: correctly render the command name in the help text
Browse files Browse the repository at this point in the history
Previously the help text failed to render the name of the script being executed in the help text.

The issue was detected by shellcheck, this commit also includes another minor fix detected by ShellCheck.

Closes #16
  • Loading branch information
Addono committed Mar 12, 2021
1 parent 613d2fe commit d2bbce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wait-for
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ usage() {
exitcode="$1"
cat << USAGE >&2
Usage:
$cmdname host:port|url [-t timeout] [-- command args]
$0 host:port|url [-t timeout] [-- command args]
-q | --quiet Do not output any status messages
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
Expand Down Expand Up @@ -168,7 +168,7 @@ fi

case "$PROTOCOL" in
tcp)
if [ "$HOST" = "" -o "$PORT" = "" ]; then
if [ "$HOST" = "" ] || [ "$PORT" = "" ]; then
echoerr "Error: you need to provide a host and port to test."
usage 2
fi
Expand Down

0 comments on commit d2bbce7

Please sign in to comment.