From 5cd152c1edff44b02143115de1085ae61258dfd9 Mon Sep 17 00:00:00 2001 From: Grey Wang Date: Sat, 9 Oct 2021 20:41:12 +1300 Subject: [PATCH] Fix build command logic when target is not specified --- ElectronNET.CLI/Commands/BuildCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index d9c0746..e369200 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -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);