File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6132,8 +6132,8 @@ public CommandSpec addSubcommand(String name, CommandLine subCommandLine) {
61326132 for (ArgSpec arg : args()) {
61336133 if (arg.scopeType() == ScopeType.INHERIT) {
61346134 subSpec.add(arg.isOption()
6135- ? OptionSpec.builder((OptionSpec) arg).inherited(true).root(arg.root()). build()
6136- : PositionalParamSpec.builder((PositionalParamSpec) arg).inherited(true).root(arg.root()). build());
6135+ ? OptionSpec.builder((OptionSpec) arg).inherited(true).build()
6136+ : PositionalParamSpec.builder((PositionalParamSpec) arg).inherited(true).build());
61376137 }
61386138 }
61396139 return this;
@@ -6260,7 +6260,7 @@ public CommandSpec addOption(OptionSpec option) {
62606260 Set<CommandLine> done = new HashSet<CommandLine>();
62616261 for (CommandLine sub : subcommands().values()) {
62626262 if (!done.contains(sub)) {
6263- sub.getCommandSpec().addOption(OptionSpec.builder(option).inherited(true).root(option.root()). build());
6263+ sub.getCommandSpec().addOption(OptionSpec.builder(option).inherited(true).build());
62646264 done.add(sub);
62656265 }
62666266 }
@@ -6320,7 +6320,7 @@ public CommandSpec addPositional(PositionalParamSpec positional) {
63206320 if (positional.scopeType() == ScopeType.INHERIT) {
63216321 Set<CommandLine> subCmds = new HashSet<CommandLine>(subcommands().values());// subcommands may be registered multiple times with different aliases
63226322 for (CommandLine sub : subCmds) {
6323- sub.getCommandSpec().addPositional(PositionalParamSpec.builder(positional).inherited(true).root(positional.root()). build());
6323+ sub.getCommandSpec().addPositional(PositionalParamSpec.builder(positional).inherited(true).build());
63246324 }
63256325 }
63266326 return this;
You can’t perform that action at this time.
0 commit comments