diff options
Diffstat (limited to 'lib/spack/spack/modules/lmod.py')
-rw-r--r-- | lib/spack/spack/modules/lmod.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/spack/spack/modules/lmod.py b/lib/spack/spack/modules/lmod.py index a057f2bf3a..858b01a395 100644 --- a/lib/spack/spack/modules/lmod.py +++ b/lib/spack/spack/modules/lmod.py @@ -92,11 +92,15 @@ def guess_core_compilers(store=False): if store and core_compilers: # If we asked to store core compilers, update the entry - # at 'site' scope (i.e. within the directory hierarchy + # in the default modify scope (i.e. within the directory hierarchy # of Spack itself) - modules_cfg = spack.config.get('modules', scope='site') + modules_cfg = spack.config.get( + 'modules', scope=spack.config.default_modify_scope() + ) modules_cfg.setdefault('lmod', {})['core_compilers'] = core_compilers - spack.config.set('modules', modules_cfg, scope='site') + spack.config.set( + 'modules', modules_cfg, scope=spack.config.default_modify_scope() + ) return core_compilers or None |