Preserve quotes in system properties

Today you cannot have spaces in system properties:

$ sbt -Dfoo="bar baz" ...

It passes [-Dfoo=bar] and [baz] to java (see https://github.com/sbt/sbt/issues/2787).

This change allows you to do:

$ sbt "-Dfoo=bar baz"

which will pass ["-Dfoo=bar baz"]. And both of these two:

$ sbt "-Dfoo=bar"
$ sbt -Dfoo=bar

still work, passing [-Dfoo=bar].
This commit is contained in:
monktastic 2017-03-16 17:01:57 -07:00 committed by GitHub
parent 8f0d61ec0d
commit c7f3be3b58
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ process_args () {
export PATH="$2/bin:$PATH" &&
shift 2 ;;
-D*) addJava "$1" && shift ;;
"-D*") addJava "$1" && shift ;;
-J*) addJava "${1:2}" && shift ;;
*) addResidual "$1" && shift ;;
esac