We currently print the help text on every command failure. Printing usage information is great when an error occurs parsing CLI options. However, it's noisy and unhelpful for errors reported afterwards.
Let's silence the help text after we have parsed CLI options. For example, in the run subcommand:
We currently print the help text on every command failure. Printing usage information is great when an error occurs parsing CLI options. However, it's noisy and unhelpful for errors reported afterwards.
Let's silence the help text after we have parsed CLI options. For example, in the
run
subcommand:https://github.com/Lilypad-Tech/lilypad/blob/b467d0fa36f9720038bf5714d7ce1409a375d2a8/cmd/lilypad/run.go#L33-L37
we could set
cmd.SilenceUsage
totrue
after handling anyProcessJobCreatorOptions
errors.The silenced error output can be tested by temporarily returning an error from the first line of the
runJob
function:https://github.com/Lilypad-Tech/lilypad/blob/b467d0fa36f9720038bf5714d7ce1409a375d2a8/cmd/lilypad/run.go#L46-L47