Fix build command logic when target is not specified

This commit is contained in:
Grey Wang
2021-10-09 20:41:12 +13:00
parent c2a8c627b9
commit 5cd152c1ed

View File

@@ -61,7 +61,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);