From 6348559c9661bd435bce1f4da014af9338df7744 Mon Sep 17 00:00:00 2001 From: Michael Pilquist Date: Tue, 20 May 2014 11:45:47 -0400 Subject: [PATCH] Fix java 8 version check --- .../com/typesafe/sbt/packager/archetypes/bash-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template b/src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template index 8f8048085..b61ca3007 100644 --- a/src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template +++ b/src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template @@ -167,7 +167,7 @@ get_mem_opts () { [[ "${java_args[@]}" == *-XX:ReservedCodeCacheSize* ]]; then echo "" - elif [[ !$no_java_version_check ]] && [[ "$java_version" > "1.8" ]]; then + elif [[ !$no_version_check ]] && [[ "$java_version" > "1.8" ]]; then echo "-Xms${mem}m -Xmx${mem}m -XX:ReservedCodeCacheSize=${codecache}m" else echo "-Xms${mem}m -Xmx${mem}m -XX:MaxPermSize=${perm}m -XX:ReservedCodeCacheSize=${codecache}m" @@ -284,7 +284,7 @@ loadConfigFile() { # Now check to see if it's a good enough version # TODO - Check to see if we have a configured default java version, otherwise use 1.6 java_version_check() { - declare -r java_version=$("$java_cmd" -version 2>&1 | awk -F '"' '/version/ {print $2}') + readonly java_version=$("$java_cmd" -version 2>&1 | awk -F '"' '/version/ {print $2}') if [[ "$java_version" == "" ]]; then echo echo No java installations was detected.