summaryrefslogtreecommitdiff
path: root/scripts/rabbitmq-env
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
commit28cfe22305371f4355cd88c6d930e236bf4b06e2 (patch)
treec57e93d4bd2d3c90f606d34aa1b8b328cc960d19 /scripts/rabbitmq-env
parent4619ec0c663ff0083fa0e0039ff60cff22c4b709 (diff)
downloadrabbitmq-server-git-28cfe22305371f4355cd88c6d930e236bf4b06e2.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.
Diffstat (limited to 'scripts/rabbitmq-env')
-rwxr-xr-xscripts/rabbitmq-env4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env
index b77416703d..b7eff42181 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}/.."