mint icon indicating copy to clipboard operation
mint copied to clipboard

Feature: Display Full Command Line Data When the Exit Function in ExecutionContext is Called

Open kcq opened this issue 1 year ago • 0 comments

One of the first questions to ask when Mint fails is, "How did you run it? What are all CLI parameters you specified?". The goal for this feature is to output this information to the screen before the CLI exits, so when users copy and paste the error information they'll also copy this information too.

Need to enhance ExecutionContext (https://github.com/mintoolkit/mint/blob/master/pkg/app/execontext.go) to accept an extra parameter when execution contexts get created. This parameter needs to hold the CLI arguments passed to the application. This information can be extracted from the urfave CLI library context: ctx.Args(). Alternatively it can be extracted using the standard Go way using os.Args.

Also need to enhance (ref *ExecutionContext) exit(exitCode int) to display the CLI command line in addition to what's already displayed there.

kcq avatar Oct 27 '24 20:10 kcq