diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 2cff2678a04..3036d433d9e 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -610,7 +610,7 @@ def _execute_patch( return _execute_patch -def conditional(*values: List[Any], when: Optional[WhenType] = None): +def conditional(*values: Union[str, bool], when: Optional[WhenType] = None): """Conditional values that can be used in variant declarations.""" # _make_when_spec returns None when the condition is statically false. when = _make_when_spec(when)