summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 336d47cbb7..06954f535b 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -545,7 +545,10 @@ def update_config(section, update_data, scope=None):
# read in the config to ensure we've got current data
configuration = get_config(section)
- configuration.update(update_data)
+ if isinstance(update_data, list):
+ configuration = update_data
+ else:
+ configuration.extend(update_data)
# read only the requested section's data.
scope.sections[section] = {section: configuration}