Expose canonical paths on command invocations

This commit is contained in:
2026-10-19 19:33:49 +00:00
parent 75fc45f072
commit 451a0c483f
5 changed files with 128 additions and 3 deletions

View File

@@ -62,11 +62,20 @@ type commandExecution struct {
func (current *execution) commandContext() commandExecution {
return commandExecution{
invocation: Invocation{Context: current.ctx, Streams: current.streams},
invocation: current.invocation(),
renderHelpTargetsFunc: current.renderHelpTargets,
}
}
func (current *execution) invocation() Invocation {
return Invocation{
Context: current.ctx,
Streams: current.streams,
enteredPath: current.route.enteredPath.String(),
canonicalPath: current.route.canonicalPath.String(),
}
}
func (current commandExecution) renderHelpTargets(targets []string) Outcome {
return current.renderHelpTargetsFunc(targets)
}