From 061ea9bfd7906fa5070acacec40f5b8eb50ac988 Mon Sep 17 00:00:00 2001 From: Alex Quick Date: Fri, 15 Dec 2017 09:36:23 -0500 Subject: [PATCH] [config] fix help output * `dokku:help --all` was getting mangled * `dokku config:help` wasn't working --- plugins/config/src/commands/commands.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/plugins/config/src/commands/commands.go b/plugins/config/src/commands/commands.go index 007daa400..a083deec8 100644 --- a/plugins/config/src/commands/commands.go +++ b/plugins/config/src/commands/commands.go @@ -19,13 +19,13 @@ Display all global or app-specific config vars Additional commands:` helpContent = ` - config (|--global), Pretty-print an app or global environment - config:get (|--global) KEY, Display a global or app-specific config value - config:set (|--global) [--encoded] [--no-restart] KEY1=VALUE1 [KEY2=VALUE2 ...], Set one or more config vars - config:unset (|--global) KEY1 [KEY2 ...], Unset one or more config vars - config:export (|--global) [--envfile], Export a global or app environment - config:keys (|--global) [--merged], Show keys set in environment - config:bundle (|--global) [--merged], Bundle environment into tarfile + config (|--global), Pretty-print an app or global environment + config:get (|--global) KEY, Display a global or app-specific config value + config:set (|--global) [--encoded] [--no-restart] KEY1=VALUE1 [KEY2=VALUE2 ...], Set one or more config vars + config:unset (|--global) KEY1 [KEY2 ...], Unset one or more config vars + config:export (|--global) [--envfile], Export a global or app environment + config:keys (|--global) [--merged], Show keys set in environment + config:bundle (|--global) [--merged], Bundle environment into tarfile ` ) @@ -43,8 +43,9 @@ func main() { merged := args.Bool("merged", false, "--merged: display the app's envionment merged with the global environment") args.Parse(os.Args[2:]) config.CommandShow(args.Args(), *global, *shell, *export, *merged) - case "config:help": case "help": + fmt.Print(helpContent) + case "config:help": usage() default: dokkuNotImplementExitCode, err := strconv.Atoi(os.Getenv("DOKKU_NOT_IMPLEMENTED_EXIT")) @@ -59,7 +60,7 @@ func main() { func usage() { config := columnize.DefaultConfig() config.Delim = "," - config.Prefix = "\t" + config.Prefix = " " config.Empty = "" content := strings.Split(helpContent, "\n")[1:] fmt.Println(helpHeader)