Ensure command-line error prevents execution of command
Fixes 6683
Rob Mensching committed
Aug 11, 2022 at 07:44 UTC
4a21abbfc4d3b18bda3547a6c792be9f21df356e
1 file changed
+6
src/wix/WixToolset.Core/CommandLine/CommandLine.cs
+6
@@ -118,6 +118,12 @@ namespace WixToolset.Core.CommandLine
118
extension.PostParse();
119
}
120
121
+ // If we hit an error, do not return a command.
122
+ if (!String.IsNullOrEmpty(parser.ErrorArgument))
123
+ {
124
+ return null;
125
+ }
126
+
127
return command ?? new HelpCommand(extensions, branding);
128
}
129