Skip to content

Commit

Permalink
Merge pull request sbt#136 from sbt/wip/java_version
Browse files Browse the repository at this point in the history
Fix Java version detection
  • Loading branch information
dwijnand authored Jan 11, 2017
2 parents 697e123 + f14b165 commit 1ca4417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/universal/bin/sbt-launch-lib.bash
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ process_args () {
process_my_args "${myargs[@]}"
}

java_version=$("$java_cmd" -Xmx512M -version 2>&1 | awk -F '"' '/version/ {print $2}')
java_version=$("$java_cmd" -Xmx512M -version 2>&1 | sed 's/.*version "\([0-9]*\)\.\([0-9]*\)\..*"/\1.\2/; 1q')
vlog "[process_args] java_version = '$java_version'"
}

Expand Down

0 comments on commit 1ca4417

Please sign in to comment.