mirror of
https://github.com/actions/runner.git
synced 2026-01-09 12:11:39 +08:00
Update src/Sdk/Expressions/Sdk/Functions/Case.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@ namespace GitHub.Actions.Expressions.Sdk.Functions
|
|||||||
out ResultMemory resultMemory)
|
out ResultMemory resultMemory)
|
||||||
{
|
{
|
||||||
resultMemory = null;
|
resultMemory = null;
|
||||||
// Validate argument count - must be odd (pairs of predicate-result plus default)
|
// Validate argument count - must be odd (pairs of predicate-result plus default)
|
||||||
if (Parameters.Count % 2 == 0)
|
if (Parameters.Count % 2 == 0)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException("case requires an odd number of arguments");
|
throw new InvalidOperationException("case requires an odd number of arguments");
|
||||||
|
|||||||
Reference in New Issue
Block a user