Print global arguments for 'dolt --help' but not 'dolt'

This commit is contained in:
Neil Macneale IV
2023-05-16 07:29:28 -07:00
committed by GitHub

View File

@@ -427,6 +427,15 @@ func runMain() int {
globalArgs, args, initCliContext, printUsage, err := splitArgsOnSubCommand(args)
if printUsage {
doltCommand.PrintUsage("dolt")
_, usage := cli.HelpAndUsagePrinters(cli.CommandDocsForCommandString("dolt", doc, globalArgParser))
specialMsg := `
Dolt subcommands are in transition to using the flags listed below as global flags.
The sql subcommand is currently the only command that uses these flags. All other commands will ignore them.
`
cli.Println(specialMsg)
usage()
return 0
}
if err != nil {