From 3ea92b1983536ce86331d0b8f953a5fd4c691ae0 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 4 Apr 2025 15:31:44 +0200 Subject: [PATCH] conditional: fix value type (#49882) --- lib/spack/spack/directives.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)