From 364db7dc259183392a3dc9dd6cbfe312842ac7da Mon Sep 17 00:00:00 2001 From: Jamie Brynes Date: Sat, 16 Nov 2019 15:13:02 +0000 Subject: [PATCH 1/2] check for arg --- ElectronNET.CLI/Commands/BuildCommand.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index ded988c6..79667520 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -50,6 +50,13 @@ public Task ExecuteAsync() SimpleCommandLineParser parser = new SimpleCommandLineParser(); parser.Parse(_args); + if (!parser.Arguments.ContainsKey(_paramTarget)) + { + Console.WriteLine($"Error: missing '{_paramTarget}' argument."); + Console.WriteLine(COMMAND_ARGUMENTS); + return false; + } + var desiredPlatform = parser.Arguments[_paramTarget][0]; string specifiedFromCustom = string.Empty; if (desiredPlatform == "custom" && parser.Arguments[_paramTarget].Length > 1) From 4014ef7a4dd6ab5a0c37adef1135793db76b1817 Mon Sep 17 00:00:00 2001 From: Jamie Brynes Date: Sat, 16 Nov 2019 15:17:55 +0000 Subject: [PATCH 2/2] changelog; --- Changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index 1588b23e..6d9396b3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # Not released +ElectronNET.CLI + +* Fixed a bug where `electronize build` with no arguments would throw a `KeyNotFoundException`. + # Released # 5.30.1