diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-01-02 20:05:54 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-01-03 15:49:32 -0600 |
| commit | df40c2722e4a41e01cf326353e2583ae82ccc9a4 (patch) | |
| tree | 277e64d517a33a2eeaf4fd94ee457c3d48c2d49a /src/WixToolset.Core/CommandLine | |
| parent | b673734cce44dd28c1d4d1810da3069324466166 (diff) | |
| download | wix-df40c2722e4a41e01cf326353e2583ae82ccc9a4.tar.gz wix-df40c2722e4a41e01cf326353e2583ae82ccc9a4.tar.bz2 wix-df40c2722e4a41e01cf326353e2583ae82ccc9a4.zip | |
Fix TryGetNextNonSwitchArgumentOrError.
Diffstat (limited to 'src/WixToolset.Core/CommandLine')
| -rw-r--r-- | src/WixToolset.Core/CommandLine/BuildCommand.cs | 2 | ||||
| -rw-r--r-- | src/WixToolset.Core/CommandLine/CommandLineParser.cs | 3 |
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; |
