summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spack3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/spack b/bin/spack
index fb9f045f35..fef793a6ce 100755
--- a/bin/spack
+++ b/bin/spack
@@ -41,7 +41,7 @@ sys.path.insert(0, SPACK_LIB_PATH)
# If there is no working directory, use the spack prefix.
try:
- os.getcwd()
+ working_dir = os.getcwd()
except OSError:
os.chdir(SPACK_PREFIX)
@@ -79,6 +79,7 @@ args = parser.parse_args()
# Set up environment based on args.
spack.verbose = args.verbose
spack.debug = args.debug
+spack.spack_working_dir = working_dir
if args.mock:
from spack.packages import PackageDB
spack.db = PackageDB(spack.mock_packages_path)