Skip to content

Commit a93091b

Browse files
authored
Merge pull request #3 from crhg/command-argument
use 'exec "$@"'
2 parents 50f3a31 + f71f819 commit a93091b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

wait-for

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ USAGE
2020
}
2121

2222
wait_for() {
23-
command="$*"
2423
for i in `seq $TIMEOUT` ; do
2524
nc -z "$HOST" "$PORT" > /dev/null 2>&1
2625

2726
result=$?
2827
if [ $result -eq 0 ] ; then
29-
if [ -n "$command" ] ; then
30-
exec $command
28+
if [ $# -gt 0 ] ; then
29+
exec "$@"
3130
fi
3231
exit 0
3332
fi

0 commit comments

Comments
 (0)