aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/CommandLine
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/CommandLine')
-rw-r--r--src/WixToolset.Core/CommandLine/BuildCommand.cs2
-rw-r--r--src/WixToolset.Core/CommandLine/CommandLineParser.cs3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs
index 072accc3..fed95958 100644
--- a/src/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -578,7 +578,7 @@ namespace WixToolset.Core.CommandLine
578 case "bindpath": 578 case "bindpath":
579 { 579 {
580 var value = parser.GetNextArgumentOrError(arg); 580 var value = parser.GetNextArgumentOrError(arg);
581 if (this.TryParseBindPath(value, out var bindPath)) 581 if (value != null && this.TryParseBindPath(value, out var bindPath))
582 { 582 {
583 this.BindPaths.Add(bindPath); 583 this.BindPaths.Add(bindPath);
584 return true; 584 return true;
diff --git a/src/WixToolset.Core/CommandLine/CommandLineParser.cs b/src/WixToolset.Core/CommandLine/CommandLineParser.cs
index 1438d820..e78da47e 100644
--- a/src/WixToolset.Core/CommandLine/CommandLineParser.cs
+++ b/src/WixToolset.Core/CommandLine/CommandLineParser.cs
@@ -138,9 +138,10 @@ namespace WixToolset.Core.CommandLine
138 { 138 {
139 var result = this.TryGetNextSwitchOrArgument(out arg); 139 var result = this.TryGetNextSwitchOrArgument(out arg);
140 140
141 if (!result && !this.IsSwitch(arg)) 141 if (!result || this.IsSwitch(arg))
142 { 142 {
143 this.ErrorArgument = arg ?? CommandLineParser.ExpectedArgument; 143 this.ErrorArgument = arg ?? CommandLineParser.ExpectedArgument;
144 return false;
144 } 145 }
145 146
146 return result; 147 return result;