diff --git a/assets/default/dotfiles/bashrc b/assets/default/dotfiles/bashrc index a31ab94..9bab956 100644 --- a/assets/default/dotfiles/bashrc +++ b/assets/default/dotfiles/bashrc @@ -52,7 +52,7 @@ if [ -d "$ANDROID_HOME" ]; then fi # Java paths -if type /usr/libexec/java_home &> /dev/null ; then +if type /usr/libexec/java_home &> /dev/null && /usr/libexec/java_home &> /dev/null ; then export JAVA_HOME="$(/usr/libexec/java_home)" fi diff --git a/assets/default/dotfiles/zshrc b/assets/default/dotfiles/zshrc index 139ef8f..0e62288 100644 --- a/assets/default/dotfiles/zshrc +++ b/assets/default/dotfiles/zshrc @@ -52,7 +52,7 @@ if [ -d "$ANDROID_HOME" ]; then fi # Java paths -if type /usr/libexec/java_home &> /dev/null ; then +if type /usr/libexec/java_home &> /dev/null && /usr/libexec/java_home &> /dev/null ; then export JAVA_HOME="$(/usr/libexec/java_home)" fi diff --git a/assets/default/fish/init/paths.fish b/assets/default/fish/init/paths.fish index fa52e3e..17c4724 100644 --- a/assets/default/fish/init/paths.fish +++ b/assets/default/fish/init/paths.fish @@ -84,7 +84,7 @@ _maybe_set -a PATH "$ANDROID_HOME/tools/bin" _maybe_set -a PATH "$ANDROID_HOME/platform-tools" # Java paths -if type -q /usr/libexec/java_home +if type -q /usr/libexec/java_home && /usr/libexec/java_home &> /dev/null set -gx JAVA_HOME (/usr/libexec/java_home) end