You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2018/12/31 16:06:05 UTC
[accumulo] branch master updated: Fix CLASSPATH bug causing current
dir to be added (#859)
This is an automated email from the ASF dual-hosted git repository.
mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/master by this push:
new 825c9b6 Fix CLASSPATH bug causing current dir to be added (#859)
825c9b6 is described below
commit 825c9b66de5694df5031a1eed3348503e667a4a2
Author: Mike Walch <mw...@apache.org>
AuthorDate: Mon Dec 31 11:06:00 2018 -0500
Fix CLASSPATH bug causing current dir to be added (#859)
* If CLASSPATH variable was empty, a colon was added
to front of CLASSPATH causing user's current directory
to be added to directory.
* This could cause unexpected files like accumulo.properties to be
added to the classpath
---
assemble/conf/accumulo-env.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/assemble/conf/accumulo-env.sh b/assemble/conf/accumulo-env.sh
index d1ef0b9..7801b74 100644
--- a/assemble/conf/accumulo-env.sh
+++ b/assemble/conf/accumulo-env.sh
@@ -51,7 +51,12 @@ if [ ! -d "$HADOOP_HOME" ]; then
fi
## Build using existing CLASSPATH, conf/ directory, dependencies in lib/, and external Hadoop & Zookeeper dependencies
-CLASSPATH="${CLASSPATH}:${conf}:${lib}/*:${HADOOP_CONF_DIR}:${ZOOKEEPER_HOME}/*:${HADOOP_HOME}/share/hadoop/client/*"
+if [ -n "$CLASSPATH" ]; then
+ CLASSPATH="${CLASSPATH}:${conf}"
+else
+ CLASSPATH="${conf}"
+fi
+CLASSPATH="${CLASSPATH}:${lib}/*:${HADOOP_CONF_DIR}:${ZOOKEEPER_HOME}/*:${HADOOP_HOME}/share/hadoop/client/*"
export CLASSPATH
##################################################################