mirror of https://github.com/sbt/sbt.git
Quoting arguments.
This commit is contained in:
parent
1b681960f4
commit
0e0dded42f
13
sbt
13
sbt
|
|
@ -111,7 +111,18 @@ done
|
|||
set -- "${args[@]}"
|
||||
|
||||
execRunner () {
|
||||
(( debug )) && echo "[command line] $@"
|
||||
# print the arguments one to a line, quoting any containing spaces
|
||||
(( debug )) && echo "# Executing command line:" && {
|
||||
for arg; do
|
||||
if echo "$arg" | grep -q ' '; then
|
||||
printf "\"%s\"\n" "$arg"
|
||||
else
|
||||
printf "%s\n" "$arg"
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
||||
"$@"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue