Count -v once and document -v -v for debug output (closes #125)
check / check (push) Failing after 2s
check / check (push) Failing after 2s
urfave/cli before v2.25.5 counted a flag given by its alias twice, so one -v or --verbose already gave debug output. Bump it to v2.27.7, which counts it once: one -v gives verbose output, two give debug. The -v help text now says -v -v instead of -vv, which stays refused: urfave/cli's option for combined short flags would let a flag that takes a value read the next letter as its value. -v and --verbose together stay refused: urfave/cli v2 refuses a flag given under two of its names, and one flag with an alias keeps help and parsing simple. The bump changes some help output; generate and fetch now name their arguments. Tests start each run at the default log level. Model: opus-5-5
This commit was merged in pull request #134.
This commit is contained in:
+10
-7
@@ -17,6 +17,7 @@ import (
|
||||
const (
|
||||
cmdGenerate = "generate"
|
||||
cmdCheck = "check"
|
||||
cmdFreshen = "freshen"
|
||||
cmdExport = "export"
|
||||
cmdFetch = "fetch"
|
||||
cmdVersion = "version"
|
||||
@@ -118,7 +119,7 @@ func commonFlags() []cli.Flag {
|
||||
&cli.BoolFlag{
|
||||
Name: "verbose",
|
||||
Aliases: []string{"v"},
|
||||
Usage: "Increase verbosity (-v for verbose, -vv for debug)",
|
||||
Usage: "Increase verbosity (-v for verbose, -v -v for debug)",
|
||||
Count: new(int),
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
@@ -131,9 +132,10 @@ func commonFlags() []cli.Flag {
|
||||
|
||||
func (mfa *CLIApp) generateCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: cmdGenerate,
|
||||
Aliases: []string{"gen"},
|
||||
Usage: "Generate manifest file",
|
||||
Name: cmdGenerate,
|
||||
Aliases: []string{"gen"},
|
||||
Usage: "Generate manifest file",
|
||||
ArgsUsage: "[path ...]",
|
||||
Action: func(c *cli.Context) error {
|
||||
mfa.setVerbosity(c)
|
||||
mfa.printBanner()
|
||||
@@ -227,7 +229,7 @@ func (mfa *CLIApp) checkCommand() *cli.Command {
|
||||
|
||||
func (mfa *CLIApp) freshenCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "freshen",
|
||||
Name: cmdFreshen,
|
||||
Usage: "Update manifest with changed, new, and removed files",
|
||||
ArgsUsage: manifestArgsUsage,
|
||||
Action: func(c *cli.Context) error {
|
||||
@@ -324,8 +326,9 @@ func (mfa *CLIApp) listCommand() *cli.Command {
|
||||
|
||||
func (mfa *CLIApp) fetchCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: cmdFetch,
|
||||
Usage: "fetch manifest and referenced files",
|
||||
Name: cmdFetch,
|
||||
Usage: "fetch manifest and referenced files",
|
||||
ArgsUsage: "URL",
|
||||
Action: func(c *cli.Context) error {
|
||||
mfa.setVerbosity(c)
|
||||
mfa.printBanner()
|
||||
|
||||
Reference in New Issue
Block a user