From 5165b9fd514c84cc2a86b35a75fd3b2840dac695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuomas=20Lappetel=C3=A4inen?= Date: Fri, 13 Sep 2019 12:19:39 +0300 Subject: [PATCH] universal/bin/sbt: enclose arrays in quotes Fixes https://github.com/sbt/sbt/issues/5076. Arrays should be enclosed in quotes, or otherwise elements with spaces will be broken, e.g. `-Dfoobar="foo bar"` will become `-Dfoobar=foo` and `bar`. --- src/universal/bin/sbt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/universal/bin/sbt b/src/universal/bin/sbt index 4bbd3a5d4..9b160f3d4 100755 --- a/src/universal/bin/sbt +++ b/src/universal/bin/sbt @@ -330,8 +330,8 @@ copyRt() { echo Copying runtime jar. mkdir -p "$java9_ext" execRunner "$java_cmd" \ - ${sbt_options[@]} \ - ${java_args[@]} \ + "${sbt_options[@]}" \ + "${java_args[@]}" \ -jar "$rtexport" \ "${java9_rt}" fi @@ -382,8 +382,8 @@ run() { # run sbt execRunner "$java_cmd" \ $(get_gc_opts) \ - ${java_args[@]} \ - ${sbt_options[@]} \ + "${java_args[@]}" \ + "${sbt_options[@]}" \ -jar "$sbt_jar" \ "${sbt_commands[@]}" \ "${residual_args[@]}"