From 591ce8cc16ccc049ef1f2dd85ebc8b72018ef614 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Wed, 25 May 2022 22:11:42 +0200 Subject: [PATCH] Runner.Client validate input value (#86) --- src/Runner.Client/Program.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Runner.Client/Program.cs b/src/Runner.Client/Program.cs index f326bbfe05c..4cff3604a18 100644 --- a/src/Runner.Client/Program.cs +++ b/src/Runner.Client/Program.cs @@ -746,6 +746,14 @@ static int Main(string[] args) } } } + if(parameters.Inputs?.Length > 0) { + foreach(var input in parameters.Inputs) { + var kv = input.Split('=', 2); + if(kv?.Length != 2) { + errors.Add($"Invalid Argument for `--input`: `{input}`, missing `=`"); + } + } + } if(errors.Count > 0) { foreach(var error in errors) { Console.Error.WriteLine(error);