summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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