From f319f20968826aef78ff17c1dc347d5f8d356403 Mon Sep 17 00:00:00 2001 From: Billy Richardson Date: Thu, 12 Sep 2024 03:20:43 -0700 Subject: [PATCH] Ignore casing on input type parameters --- src/Task/AggregateConfig.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Task/AggregateConfig.cs b/src/Task/AggregateConfig.cs index 0c1a350..bc9aaf0 100644 --- a/src/Task/AggregateConfig.cs +++ b/src/Task/AggregateConfig.cs @@ -48,7 +48,7 @@ public override bool Execute() OutputFile = Path.GetFullPath(OutputFile); - if (!Enum.TryParse(OutputType, out OutputTypeEnum outputType) || + if (!Enum.TryParse(OutputType, true, out OutputTypeEnum outputType) || !Enum.IsDefined(typeof(OutputTypeEnum), outputType)) { Log.LogError("Invalid OutputType: {0}. Available options: {1}", OutputType, string.Join(", ", Enum.GetNames(typeof(OutputTypeEnum)))); @@ -57,7 +57,7 @@ public override bool Execute() InputTypeEnum inputType = InputTypeEnum.Yaml; if (!string.IsNullOrEmpty(InputType) && - (!Enum.TryParse(InputType, out inputType) || !Enum.IsDefined(typeof(InputTypeEnum), inputType))) + (!Enum.TryParse(InputType, true, out inputType) || !Enum.IsDefined(typeof(InputTypeEnum), inputType))) { Log.LogError("Invalid InputType: {0}. Available options: {1}", InputType, string.Join(", ", Enum.GetNames(typeof(InputTypeEnum)))); return false;