Skip to content

Commit 5b25af5

Browse files
authored
Merge pull request #784 from jonsequitur/remove-guard-in-commandlinebuilder-ctor
don't throw in CommandLineBuilder ctor
2 parents 20d7700 + b62db8c commit 5b25af5

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

src/System.CommandLine/Builder/CommandLineBuilder.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ public class CommandLineBuilder : CommandBuilder
1717
public CommandLineBuilder(Command rootCommand = null)
1818
: base(rootCommand ?? new RootCommand())
1919
{
20-
if (rootCommand?.ImplicitParser != null)
21-
{
22-
throw new ArgumentException($"Command \"{rootCommand.Name}\" has already been configured.");
23-
}
2420
}
2521

2622
public bool EnableDirectives { get; set; } = true;

src/System.CommandLine/Command.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System.Collections;
55
using System.Collections.Generic;
6-
using System.CommandLine.Builder;
76
using System.CommandLine.Collections;
87
using System.CommandLine.Invocation;
98
using System.CommandLine.Parsing;

0 commit comments

Comments
 (0)