Skip to content

Commit 364db7d

Browse files
committed
check for arg
1 parent 7f92ffa commit 364db7d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ElectronNET.CLI/Commands/BuildCommand.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ public Task<bool> ExecuteAsync()
5050
SimpleCommandLineParser parser = new SimpleCommandLineParser();
5151
parser.Parse(_args);
5252

53+
if (!parser.Arguments.ContainsKey(_paramTarget))
54+
{
55+
Console.WriteLine($"Error: missing '{_paramTarget}' argument.");
56+
Console.WriteLine(COMMAND_ARGUMENTS);
57+
return false;
58+
}
59+
5360
var desiredPlatform = parser.Arguments[_paramTarget][0];
5461
string specifiedFromCustom = string.Empty;
5562
if (desiredPlatform == "custom" && parser.Arguments[_paramTarget].Length > 1)

0 commit comments

Comments
 (0)