From c7f3be3b58ee07601d01448f2ee936ccc6b8e9bf Mon Sep 17 00:00:00 2001 From: monktastic Date: Thu, 16 Mar 2017 17:01:57 -0700 Subject: [PATCH] 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]. --- src/universal/bin/sbt-launch-lib.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/universal/bin/sbt-launch-lib.bash b/src/universal/bin/sbt-launch-lib.bash index 47bed1748..621ae125e 100755 --- a/src/universal/bin/sbt-launch-lib.bash +++ b/src/universal/bin/sbt-launch-lib.bash @@ -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