fix: adjust os judgment method with uname

This commit is contained in:
pokemeng
2022-09-16 11:34:03 +08:00
parent 5f1f33d2b9
commit d4f416de14

View File

@@ -9,7 +9,7 @@ error_exit ()
[ ! -e "$JAVA_HOME/bin/java" ] && unset JAVA_HOME
if [ -z "$JAVA_HOME" ]; then
if $darwin; then
if [ "Darwin" = "$(uname -s)" ]; then
if [ -x '/usr/libexec/java_home' ] ; then
export JAVA_HOME=`/usr/libexec/java_home`