summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@rabbitmq.com>2014-06-23 18:41:59 +0400
committerMichael Klishin <michael@rabbitmq.com>2014-06-23 18:41:59 +0400
commitdee89f754f9a4350dbbebce2aebcfb42ff255390 (patch)
treec57e93d4bd2d3c90f606d34aa1b8b328cc960d19
parent1fbf5c517694e28c09698dcb4d8a9fe933b1f64b (diff)
downloadrabbitmq-server-dee89f754f9a4350dbbebce2aebcfb42ff255390.tar.gz
Don't use -e for a portion of rabbitmq-env that uses readlink
readlink exists with an error when its argument is not a symlink.
-rwxr-xr-xscripts/rabbitmq-env4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env
index b7741670..b7eff421 100755
--- a/scripts/rabbitmq-env
+++ b/scripts/rabbitmq-env
@@ -15,6 +15,9 @@
## Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved.
##
+## readlink exits with an error if the given argument is
+## not a symlink
+set +e
# Determine where this script is really located (if this script is
# invoked from another script, this is the location of the caller)
SCRIPT_PATH="$0"
@@ -31,6 +34,7 @@ while [ -h "$SCRIPT_PATH" ] ; do
SCRIPT_PATH=$FULL_PATH
fi
done
+set -e
SCRIPT_DIR=`dirname $SCRIPT_PATH`
RABBITMQ_HOME="${SCRIPT_DIR}/.."