summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2013-05-15 16:47:50 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2013-05-15 16:47:50 -0700
commit340fe565d4d33b554a3036eef2dd3dbdc6bc6a4f (patch)
treea974e64e9a3614205880b8ade6c289b91660e404
parenteb0832e3795e751b64f813f11b3a3ac03631b0bc (diff)
downloadspack-340fe565d4d33b554a3036eef2dd3dbdc6bc6a4f.tar.gz
spack-340fe565d4d33b554a3036eef2dd3dbdc6bc6a4f.tar.bz2
spack-340fe565d4d33b554a3036eef2dd3dbdc6bc6a4f.tar.xz
spack-340fe565d4d33b554a3036eef2dd3dbdc6bc6a4f.zip
Use realpath in addition to expanduser to locate spack directory.
-rwxr-xr-xbin/spack3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/spack b/bin/spack
index 26d34387b7..0a6d808342 100755
--- a/bin/spack
+++ b/bin/spack
@@ -5,7 +5,8 @@ import sys
import argparse
# Find spack's location and its prefix.
-SPACK_FILE = os.environ["SPACK_FILE"] = os.path.expanduser(__file__)
+SPACK_FILE = os.path.realpath(os.path.expanduser(__file__))
+os.environ["SPACK_FILE"] = SPACK_FILE
SPACK_PREFIX = os.path.dirname(os.path.dirname(SPACK_FILE))
# Allow spack libs to be imported in our scripts