summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/directives.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py
index 1e2435eac2..eca984093d 100644
--- a/lib/spack/spack/directives.py
+++ b/lib/spack/spack/directives.py
@@ -381,7 +381,7 @@ def extends(spec, **kwargs):
# msg = 'Packages can extend at most one other package.'
# raise DirectiveError(directive, msg)
- when = kwargs.pop('when', pkg.name)
+ when = kwargs.get('when', pkg.name)
_depends_on(pkg, spec, when=when)
pkg.extendees[spec] = (Spec(spec), kwargs)
return _execute_extends