@joebigelow / wix / commits / a52e7926

Report invalid command line arguments as errors

First part of fix for wixtoolset/issues#6313

Rob Mensching committed Jan 7, 2021 at 23:09 UTC a52e79268228a5feb87f5ba763fb4bbac6f96681
1 file changed +4 -1
src/WixToolset.Extensibility/Services/ICommandLineParser.cs
+4 -1
@@ -3,11 +3,12 @@
3 namespace WixToolset.Extensibility.Services
4 {
5 using System.Collections.Generic;
6 + using WixToolset.Data;
7
8 #pragma warning disable 1591 // TODO: add documentation
9 public interface ICommandLineParser
10 {
10 - string ErrorArgument { get; set; }
11 + string ErrorArgument { get; }
12
13 /// <summary>
14 /// Validates that a valid switch (starts with "/" or "-"), and returns a bool indicating its validity
@@ -32,6 +33,8 @@ namespace WixToolset.Extensibility.Services
33
34 bool GetNextArgumentAsFilePathOrError(string commandLineSwitch, string fileType, IList<string> paths);
35
36 + void ReportErrorArgument(string argument, Message message = null);
37 +
38 bool TryGetNextSwitchOrArgument(out string arg);
39 }
40 }