Parse invocation flags across command discovery
This commit is contained in:
13
parser.go
13
parser.go
@@ -71,7 +71,7 @@ func (a *App) routeSnapshot() *routingSnapshot {
|
||||
}
|
||||
|
||||
func (a *App) buildRoutingSnapshot() *routingSnapshot {
|
||||
root := &commandmeta.Command{Name: a.identity.Name, CoreFlags: commandmeta.ReportingFlags()}
|
||||
root := &commandmeta.Command{Name: a.identity.Name, CoreFlags: commandmeta.ReportingFlags(), InvocationFlags: a.featureFlags}
|
||||
snapshot := &routingSnapshot{
|
||||
metadata: root,
|
||||
runners: make(map[commandmeta.Key]commandPayload),
|
||||
@@ -113,11 +113,12 @@ func bridgeCommand(node *canonicalNode, snapshot *routingSnapshot, next *command
|
||||
record := node.command.record
|
||||
*next = *next + 1
|
||||
declaration := &commandmeta.Command{
|
||||
Key: *next,
|
||||
Name: record.name,
|
||||
Summary: record.summary,
|
||||
Description: record.description,
|
||||
CoreFlags: commandmeta.ReportingFlags(),
|
||||
Key: *next,
|
||||
Name: record.name,
|
||||
Summary: record.summary,
|
||||
Description: record.description,
|
||||
CoreFlags: commandmeta.ReportingFlags(),
|
||||
InvocationFlags: snapshot.featureFlags,
|
||||
}
|
||||
node.metadata = declaration
|
||||
if record.payload != nil {
|
||||
|
||||
Reference in New Issue
Block a user