diff options
author | Jonathon Anderson <jonathon.anderson@colorado.edu> | 2020-04-06 02:00:42 -0600 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-04-15 12:37:16 -0700 |
commit | ed2781973cfe60c2d3187133684b39e7a752e738 (patch) | |
tree | 55e065a649565d99fd77d95c9a4c55705a019f76 /lib | |
parent | 99bb88aeadfd89d00d998b2e8809db85e0fd01a6 (diff) | |
download | spack-ed2781973cfe60c2d3187133684b39e7a752e738.tar.gz spack-ed2781973cfe60c2d3187133684b39e7a752e738.tar.bz2 spack-ed2781973cfe60c2d3187133684b39e7a752e738.tar.xz spack-ed2781973cfe60c2d3187133684b39e7a752e738.zip |
Source devnull in environment_after_sourcing_files (closes #15775) (#15791)
spack.util.environment_after_sourcing_files compares the local
environment against a shell environment after having sourced a
file; but this ends up including the default shell profile and
rc, which might differ from the local environment.
To change this, compare against the default shell environment,
expressed here as 'source /dev/null'.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/environment.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 1acbb64790..8069f51431 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -604,7 +604,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( |