mirror of https://github.com/sbt/sbt.git
Simplify the debug in execRunner and fix the $java_args[@] expansion, fixes #253
This commit is contained in:
parent
5a91334147
commit
2d21c0fd2a
|
|
@ -57,14 +57,10 @@ rt_export_file () {
|
||||||
}
|
}
|
||||||
|
|
||||||
execRunner () {
|
execRunner () {
|
||||||
# print the arguments one to a line, quoting any containing spaces
|
# print the arguments one to a line, shell-quoted
|
||||||
[[ $verbose || $debug ]] && echo "# Executing command line:" && {
|
[[ $verbose || $debug ]] && echo "# Executing command line:" && {
|
||||||
for arg; do
|
for arg in "$@"; do
|
||||||
if printf "%s\n" "$arg" | grep -q ' '; then
|
printf "%q\n" "$arg"
|
||||||
printf "\"%s\"\n" "$arg"
|
|
||||||
else
|
|
||||||
printf "%s\n" "$arg"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
@ -348,7 +344,7 @@ run() {
|
||||||
$(get_gc_opts) \
|
$(get_gc_opts) \
|
||||||
${JAVA_OPTS} \
|
${JAVA_OPTS} \
|
||||||
${SBT_OPTS:-$default_sbt_opts} \
|
${SBT_OPTS:-$default_sbt_opts} \
|
||||||
${java_args[@]} \
|
"${java_args[@]}" \
|
||||||
-jar "$sbt_jar" \
|
-jar "$sbt_jar" \
|
||||||
"${sbt_commands[@]}" \
|
"${sbt_commands[@]}" \
|
||||||
"${residual_args[@]}"
|
"${residual_args[@]}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue