Skip to content

Commit f71f819

Browse files
committed
use 'exec "$@"'
1 parent 51de968 commit f71f819

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)