summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/util/environment.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index 248a6d3c8c..862f04f8eb 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -602,7 +602,8 @@ class EnvironmentModifications(object):
# Compute the environments before and after sourcing
before = sanitize(
- dict(os.environ), blacklist=blacklist, whitelist=whitelist
+ environment_after_sourcing_files(os.devnull, **kwargs),
+ blacklist=blacklist, whitelist=whitelist
)
file_and_args = (filename,) + arguments
after = sanitize(