Skip to content

Commit

Permalink
Check if argument key doesn't have a value.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Apr 14, 2021
1 parent 80793d3 commit 0a58d39
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Server.Installer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ private static bool ParseCliParams(string[] args, out CliParams cliParams)
try
{
var key = args[i].Trim();

if (i == args.Length - 1)
{
ConsoleHelper.WriteError("An argument is missing a value.");
return false;
}

var value = args[i + 1].Trim();

switch (key)
Expand Down

0 comments on commit 0a58d39

Please sign in to comment.