summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/config.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 7bbf9da7d8..3a34db13e0 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -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)