Skip to content

Commit db04971

Browse files
author
Douglas Gibbons
authored
Merge pull request #40 from szczad/master
fix: preserve quotation when passing arguments to command.
2 parents 8b4051d + 8ed92e8 commit db04971

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wait-for-it.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ do
118118
;;
119119
--)
120120
shift
121-
CLI="$@"
121+
CLI=("$@")
122122
break
123123
;;
124124
--help)
@@ -171,7 +171,7 @@ if [[ $CLI != "" ]]; then
171171
echoerr "$cmdname: strict mode, refusing to execute subprocess"
172172
exit $RESULT
173173
fi
174-
exec $CLI
174+
exec "${CLI[@]}"
175175
else
176176
exit $RESULT
177177
fi

0 commit comments

Comments
 (0)