Skip to content

Commit 0ef5edf

Browse files
Merge pull request #613 from aguang-xyz/fix/npe-when-target-not-specified
Fix IndexOutOfRangeException in build command parsing logic
2 parents 7db609c + 5cd152c commit 0ef5edf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ElectronNET.CLI/Commands/BuildCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public Task<bool> ExecuteAsync()
6262
if (parser.Arguments.ContainsKey(_paramVersion))
6363
version = parser.Arguments[_paramVersion][0];
6464

65-
if (!parser.Arguments.ContainsKey(_paramTarget))
65+
if (!parser.Arguments.ContainsKey(_paramTarget) || parser.Arguments[_paramTarget].Length == 0)
6666
{
6767
Console.WriteLine($"Error: missing '{_paramTarget}' argument.");
6868
Console.WriteLine(COMMAND_ARGUMENTS);

0 commit comments

Comments
 (0)