Skip to content

Commit

Permalink
from_sourcing_file: fixed a bug + added a few ignored variables
Browse files Browse the repository at this point in the history
closes spack#7536

Credits for this change goes to @mgsternberg (original author of spack#7536)

The new variables being ignored are specific to Modules v4.
  • Loading branch information
alalazo committed Mar 21, 2019
1 parent 70e436e commit 767be88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/spack/spack/util/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,12 @@ def from_sourcing_file(filename, *args, **kwargs):
for k, v in env_after.items())

# Other variables unrelated to sourcing a file
blacklist.extend(['SHLVL', '_', 'PWD', 'OLDPWD', 'PS2'])
blacklist.extend([
# Bash internals
'SHLVL', '_', 'PWD', 'OLDPWD', 'PS2', 'ENV',
# Environment modules v4
'LOADEDMODULES', '_LMFILES_', 'BASH_FUNC_module()'
])

def set_intersection(fullset, *args):
# A set intersection using string literals and regexs
Expand Down

0 comments on commit 767be88

Please sign in to comment.