aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/CommandLine/CommandLine.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-01-07 23:12:49 -0800
committerRob Mensching <rob@firegiant.com>2021-01-08 15:47:31 -0800
commite35ee2e8c58bf55da5f3d04915d588fb04d6809d (patch)
tree4bf0cfd782ec990b6a5d4ac9aec390d44dee097b /src/WixToolset.Core/CommandLine/CommandLine.cs
parent458ff7ce24b33f6df46ae8ef728685c555d55ff7 (diff)
downloadwix-e35ee2e8c58bf55da5f3d04915d588fb04d6809d.tar.gz
wix-e35ee2e8c58bf55da5f3d04915d588fb04d6809d.tar.bz2
wix-e35ee2e8c58bf55da5f3d04915d588fb04d6809d.zip
Report invalid command line arguments as errors
Fixes wixtoolset/issues#6313
Diffstat (limited to 'src/WixToolset.Core/CommandLine/CommandLine.cs')
-rw-r--r--src/WixToolset.Core/CommandLine/CommandLine.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WixToolset.Core/CommandLine/CommandLine.cs b/src/WixToolset.Core/CommandLine/CommandLine.cs
index 5439eb39..0c21eaaa 100644
--- a/src/WixToolset.Core/CommandLine/CommandLine.cs
+++ b/src/WixToolset.Core/CommandLine/CommandLine.cs
@@ -97,19 +97,19 @@ namespace WixToolset.Core.CommandLine
97 { 97 {
98 if (!this.TryParseCommand(arg, parser, extensions, out command)) 98 if (!this.TryParseCommand(arg, parser, extensions, out command))
99 { 99 {
100 parser.ErrorArgument = arg; 100 parser.ReportErrorArgument(arg);
101 } 101 }
102 } 102 }
103 else if (parser.IsSwitch(arg)) 103 else if (parser.IsSwitch(arg))
104 { 104 {
105 if (!command.TryParseArgument(parser, arg) && !TryParseCommandLineArgumentWithExtension(arg, parser, extensions)) 105 if (!command.TryParseArgument(parser, arg) && !TryParseCommandLineArgumentWithExtension(arg, parser, extensions))
106 { 106 {
107 parser.ErrorArgument = arg; 107 parser.ReportErrorArgument(arg);
108 } 108 }
109 } 109 }
110 else if (!TryParseCommandLineArgumentWithExtension(arg, parser, extensions) && !command.TryParseArgument(parser, arg)) 110 else if (!TryParseCommandLineArgumentWithExtension(arg, parser, extensions) && !command.TryParseArgument(parser, arg))
111 { 111 {
112 parser.ErrorArgument = arg; 112 parser.ReportErrorArgument(arg);
113 } 113 }
114 } 114 }
115 115