diff --git a/gradle-plugins/cordformation/src/main/resources/net/corda/plugins/runnodes b/gradle-plugins/cordformation/src/main/resources/net/corda/plugins/runnodes index bc27ae3233..b735daf054 100755 --- a/gradle-plugins/cordformation/src/main/resources/net/corda/plugins/runnodes +++ b/gradle-plugins/cordformation/src/main/resources/net/corda/plugins/runnodes @@ -27,11 +27,13 @@ if which osascript >/dev/null; then end tell" osascript -e "$script" else - # Some other UNIX, probably Linux + # Some other UNIX, probably Linux (does not support msys or cygwin) + # TODO: msys and cygwin support # - # This next line is safe even if JAVA_HOME is unset. If it is set, it means that java overrides the - # default system java, which is what we want. - export PATH=$JAVA_HOME/bin:$PATH + # If it is set, it means that java overrides the default system java, which is what we want. + if [ -n "${JAVA_HOME-}" ]; then + export PATH="$JAVA_HOME/bin:$PATH" + fi for dir in `ls`; do if [ -d $dir ]; then pushd $dir >/dev/null @@ -39,4 +41,4 @@ else popd >/dev/null fi done -fi \ No newline at end of file +fi