diff options
author | Rob Mensching <rob@firegiant.com> | 2021-01-07 23:09:28 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-01-08 15:41:29 -0800 |
commit | a52e79268228a5feb87f5ba763fb4bbac6f96681 (patch) | |
tree | 595d53df73d63a035535d2ae795c396f39b0249e /src | |
parent | 7de0df7fc8582073c54b342713cd75131f0aa64f (diff) | |
download | wix-a52e79268228a5feb87f5ba763fb4bbac6f96681.tar.gz wix-a52e79268228a5feb87f5ba763fb4bbac6f96681.tar.bz2 wix-a52e79268228a5feb87f5ba763fb4bbac6f96681.zip |
Report invalid command line arguments as errors
First part of fix for wixtoolset/issues#6313
Diffstat (limited to 'src')
-rw-r--r-- | src/WixToolset.Extensibility/Services/ICommandLineParser.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/WixToolset.Extensibility/Services/ICommandLineParser.cs b/src/WixToolset.Extensibility/Services/ICommandLineParser.cs index f538e0b7..cd17f100 100644 --- a/src/WixToolset.Extensibility/Services/ICommandLineParser.cs +++ b/src/WixToolset.Extensibility/Services/ICommandLineParser.cs | |||
@@ -3,11 +3,12 @@ | |||
3 | namespace WixToolset.Extensibility.Services | 3 | namespace WixToolset.Extensibility.Services |
4 | { | 4 | { |
5 | using System.Collections.Generic; | 5 | using System.Collections.Generic; |
6 | using WixToolset.Data; | ||
6 | 7 | ||
7 | #pragma warning disable 1591 // TODO: add documentation | 8 | #pragma warning disable 1591 // TODO: add documentation |
8 | public interface ICommandLineParser | 9 | public interface ICommandLineParser |
9 | { | 10 | { |
10 | string ErrorArgument { get; set; } | 11 | string ErrorArgument { get; } |
11 | 12 | ||
12 | /// <summary> | 13 | /// <summary> |
13 | /// Validates that a valid switch (starts with "/" or "-"), and returns a bool indicating its validity | 14 | /// Validates that a valid switch (starts with "/" or "-"), and returns a bool indicating its validity |
@@ -32,6 +33,8 @@ namespace WixToolset.Extensibility.Services | |||
32 | 33 | ||
33 | bool GetNextArgumentAsFilePathOrError(string commandLineSwitch, string fileType, IList<string> paths); | 34 | bool GetNextArgumentAsFilePathOrError(string commandLineSwitch, string fileType, IList<string> paths); |
34 | 35 | ||
36 | void ReportErrorArgument(string argument, Message message = null); | ||
37 | |||
35 | bool TryGetNextSwitchOrArgument(out string arg); | 38 | bool TryGetNextSwitchOrArgument(out string arg); |
36 | } | 39 | } |
37 | } | 40 | } |