DRILL-1516: When searching for the java executable, ignore directories named 
"java"


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/cd6dd9c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/cd6dd9c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/cd6dd9c6

Branch: refs/heads/master
Commit: cd6dd9c6fb364335df5836af3e1f4aef9a3fe8b5
Parents: eb8c1c2
Author: Patrick Wong <pw...@maprtech.com>
Authored: Thu Oct 9 13:20:57 2014 -0700
Committer: Aditya Kishore <adi...@maprtech.com>
Committed: Thu Oct 9 14:09:04 2014 -0700

----------------------------------------------------------------------
 distribution/src/resources/drill-config.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/cd6dd9c6/distribution/src/resources/drill-config.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drill-config.sh 
b/distribution/src/resources/drill-config.sh
index 8afb237..313c568 100644
--- a/distribution/src/resources/drill-config.sh
+++ b/distribution/src/resources/drill-config.sh
@@ -160,7 +160,7 @@ if $is_cygwin; then
 else
   JAVA_BIN="java"
 fi
-JAVA=`find -L "$JAVA_HOME" -name $JAVA_BIN | head -n 1`
+JAVA=`find -L "$JAVA_HOME" -name $JAVA_BIN -type f | head -n 1`
 if [ ! -e "$JAVA" ]; then
   echo "Java not found at JAVA_HOME=$JAVA_HOME."
   exit 1

Reply via email to