mirror of
https://github.com/apache/sqoop.git
synced 2025-05-04 00:43:42 +08:00
SQOOP-1070: Shell scripts should not rely on $PATH if $JAVA_HOME is set
(Sean Mackrory via Jarek Jarcec Cecho)
This commit is contained in:
parent
662f18a0a3
commit
6d1779a050
7
dist/src/main/bin/sqoop.sh
vendored
7
dist/src/main/bin/sqoop.sh
vendored
@ -102,7 +102,12 @@ case $COMMAND in
|
||||
# We need to change current directory back to original as optional user side script
|
||||
# might be specified with relative path.
|
||||
cd ${OLD_DIR}
|
||||
java -classpath ${CLASSPATH} org.apache.sqoop.client.shell.SqoopShell $2
|
||||
|
||||
EXEC_JAVA='java'
|
||||
if [ -n "${JAVA_HOME}" ] ; then
|
||||
EXEC_JAVA="${JAVA_HOME}/bin/java"
|
||||
fi
|
||||
${EXEC_JAVA} -classpath ${CLASSPATH} org.apache.sqoop.client.shell.SqoopShell $2
|
||||
;;
|
||||
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user