Skip to content

Commit 686ba42

Browse files
committed
Fix color in validation exception message. Delete IgnoreAttribute.
1 parent 9ec3666 commit 686ba42

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Src/Attributes.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ public sealed class IsMandatoryAttribute() : Attribute
3131
{
3232
}
3333

34-
/// <summary>Specifies that the command-line parser should ignore a field.</summary>
35-
[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
36-
public sealed class IgnoreAttribute : Attribute
37-
{
38-
/// <summary>Constructor.</summary>
39-
public IgnoreAttribute() { }
40-
}
41-
4234
/// <summary>
4335
/// Specifies that a field of an enum type should be interpreted as multiple possible options, each specified by an <see
4436
/// cref="OptionAttribute"/> on the enum values in the enum type.</summary>

Src/CommandLineParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ private static object parseCommandLine(string[] args, Type type, int i, Func<Con
505505
}
506506
catch (CommandLineValidationException exc) when (exc.GenerateHelpFunc == null)
507507
{
508-
throw new CommandLineValidationException(exc.Message, getHelpGenerator(type, helpProcessor));
508+
throw new CommandLineValidationException(exc.ColoredMessage, getHelpGenerator(type, helpProcessor));
509509
}
510510

511511
return ret;

0 commit comments

Comments
 (0)