summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/directives.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py
index 207624965d..0d4834ed13 100644
--- a/lib/spack/spack/directives.py
+++ b/lib/spack/spack/directives.py
@@ -921,9 +921,9 @@ def maintainers(*names: str):
"""
def _execute_maintainer(pkg):
- maintainers_from_base = getattr(pkg, "maintainers", [])
- # Here it is essential to copy, otherwise we might add to an empty list in the parent
- pkg.maintainers = list(sorted(set(maintainers_from_base + list(names))))
+ maintainers = set(getattr(pkg, "maintainers", []))
+ maintainers.update(names)
+ pkg.maintainers = sorted(maintainers)
return _execute_maintainer