If CDPATH is set, cd may result in output to stdout.
Swallow the output. This is safe since the script outputs the value used for CATALINA_HOME so any issues will be visible then.
Patch provided by mdietze
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@928732
13f79535-47bb-0310-9956-
ffa450edef68
PRGDIR=`dirname "$PRG"`
# Only set CATALINA_HOME if not already set
-[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
+[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null 2>&1 ; pwd`
# Ensure that any user defined CLASSPATH variables are not used on startup,
# but allow them to be specified in setenv.sh, in rare case when it is needed.