fixed compiler config init logic
This commit is contained in:
parent
88bec814eb
commit
189e8b3f34
1 changed files with 11 additions and 8 deletions
|
@ -102,15 +102,18 @@ def init_compiler_config():
|
|||
# configured. Avoid updating automatically if there ARE site
|
||||
# compilers configured but no user ones.
|
||||
# if (isinstance(arch, basestring) or arch == my_arch) and arch not in config:
|
||||
if not config:
|
||||
if scope is None:
|
||||
# We know no compilers were configured in any scope.
|
||||
init_compiler_config()
|
||||
config = spack.config.get_config('compilers', scope=scope)
|
||||
elif scope == 'user':
|
||||
# Check the site config and update the user config if
|
||||
# nothing is configured at the site level.
|
||||
site_config = spack.config.get_config('compilers', scope='site')
|
||||
if not site_config:
|
||||
init_compiler_config()
|
||||
config = spack.config.get_config('compilers', scope=scope)
|
||||
|
||||
return config
|
||||
|
||||
|
|
Loading…
Reference in a new issue