From 4a21abbfc4d3b18bda3547a6c792be9f21df356e Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 11 Aug 2022 07:44:55 -0700 Subject: Ensure command-line error prevents execution of command Fixes 6683 --- src/wix/WixToolset.Core/CommandLine/CommandLine.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wix/WixToolset.Core/CommandLine/CommandLine.cs b/src/wix/WixToolset.Core/CommandLine/CommandLine.cs index 0921f9ff..07dcc2d2 100644 --- a/src/wix/WixToolset.Core/CommandLine/CommandLine.cs +++ b/src/wix/WixToolset.Core/CommandLine/CommandLine.cs @@ -118,6 +118,12 @@ namespace WixToolset.Core.CommandLine extension.PostParse(); } + // If we hit an error, do not return a command. + if (!String.IsNullOrEmpty(parser.ErrorArgument)) + { + return null; + } + return command ?? new HelpCommand(extensions, branding); } -- cgit v1.2.3-55-g6feb