fix: preserve quotation when passing arguments to command.

This commit is contained in:
Grzegorz Szczudlik
2017-07-20 12:08:57 +02:00
parent 8b4051d5f3
commit 8ed92e8cab

View File

@ -118,7 +118,7 @@ do
;; ;;
--) --)
shift shift
CLI="$@" CLI=("$@")
break break
;; ;;
--help) --help)
@ -171,7 +171,7 @@ if [[ $CLI != "" ]]; then
echoerr "$cmdname: strict mode, refusing to execute subprocess" echoerr "$cmdname: strict mode, refusing to execute subprocess"
exit $RESULT exit $RESULT
fi fi
exec $CLI exec "${CLI[@]}"
else else
exit $RESULT exit $RESULT
fi fi