Skip to content

Commit d2bbce7

Browse files
committed
fix: correctly render the command name in the help text
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
1 parent 613d2fe commit d2bbce7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wait-for

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ usage() {
3636
exitcode="$1"
3737
cat << USAGE >&2
3838
Usage:
39-
$cmdname host:port|url [-t timeout] [-- command args]
39+
$0 host:port|url [-t timeout] [-- command args]
4040
-q | --quiet Do not output any status messages
4141
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
4242
-- COMMAND ARGS Execute command with args after the test finishes
@@ -168,7 +168,7 @@ fi
168168

169169
case "$PROTOCOL" in
170170
tcp)
171-
if [ "$HOST" = "" -o "$PORT" = "" ]; then
171+
if [ "$HOST" = "" ] || [ "$PORT" = "" ]; then
172172
echoerr "Error: you need to provide a host and port to test."
173173
usage 2
174174
fi

0 commit comments

Comments
 (0)