summaryrefslogtreecommitdiff
path: root/java/javavmwrapper/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/javavmwrapper/src')
-rw-r--r--java/javavmwrapper/src/javavmwrapper.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/javavmwrapper/src/javavmwrapper.sh b/java/javavmwrapper/src/javavmwrapper.sh
index b6447448911f..b3685bd7e17c 100644
--- a/java/javavmwrapper/src/javavmwrapper.sh
+++ b/java/javavmwrapper/src/javavmwrapper.sh
@@ -29,6 +29,7 @@
#
# MAINTAINER=java@FreeBSD.org
+SAVE_PATH=${PATH}
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
PREFIX="%%PREFIX%%"
@@ -42,6 +43,9 @@ MAKE=/usr/bin/make
tryJavaCommand () {
# Check for the command being executable and exec it if so.
if [ -x "${1}" ]; then
+ if [ ! -z "${SAVE_PATH}" ]; then
+ export PATH=${SAVE_PATH}
+ fi
exec "${@}"
fi