mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-19 23:25:59 +00:00
Merge pull request #613 from aguang-xyz/fix/npe-when-target-not-specified
Fix IndexOutOfRangeException in build command parsing logic
This commit is contained in:
@@ -62,7 +62,7 @@ namespace ElectronNET.CLI.Commands
|
||||
if (parser.Arguments.ContainsKey(_paramVersion))
|
||||
version = parser.Arguments[_paramVersion][0];
|
||||
|
||||
if (!parser.Arguments.ContainsKey(_paramTarget))
|
||||
if (!parser.Arguments.ContainsKey(_paramTarget) || parser.Arguments[_paramTarget].Length == 0)
|
||||
{
|
||||
Console.WriteLine($"Error: missing '{_paramTarget}' argument.");
|
||||
Console.WriteLine(COMMAND_ARGUMENTS);
|
||||
|
||||
Reference in New Issue
Block a user