spack mirror remove: fix no-update error (#6559)
Fixes #4573 "spack mirror remove" was not actually removing mirrors from the configuration.
This commit is contained in:
parent
f764ac4573
commit
d3913709bb
1 changed files with 1 additions and 9 deletions
|
@ -445,16 +445,8 @@ def update_config(section, update_data, scope=None):
|
|||
validate_section_name(section) # validate section name
|
||||
scope = validate_scope(scope) # get ConfigScope object from string.
|
||||
|
||||
# read in the config to ensure we've got current data
|
||||
configuration = get_config(section)
|
||||
|
||||
if isinstance(update_data, list):
|
||||
configuration = update_data
|
||||
else:
|
||||
configuration.update(update_data)
|
||||
|
||||
# read only the requested section's data.
|
||||
scope.sections[section] = {section: configuration}
|
||||
scope.sections[section] = {section: update_data}
|
||||
scope.write_section(section)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue