Skip to content

Bugs possibly related to command branches #428

@jdvor

Description

@jdvor

I think I've found at least 2 bugs possibly related to command branches. Here's repo with the example. It's using Spectre.Console 0.39.0.

  • Command options from parent (branch) settings are not taken into account / parsed. In this example PrintBaseSettings.Message. Result is failing ValidateExamles() and when -m MESSAGE is passed as command line argument the value is ignored. Reproduce by uncommenting the line Program.cs:L17
  • Dependency injection through type TypeRegistrar & TypeResolver is called for both command type and their settings, not just command constructor dependencies (IFooService for DecoratedPrintCmd in this example). Maybe this is not a bug, but it is at least unexpected and unusual. Reproduce: comment lines Program.cs:L46-47 and Program.cs:L50-51.

Metadata

Metadata

Labels

area-CLICommand-Line InterfacebugSomething isn't working

Type

No type

Projects

Status

Done 🚀

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions