From 9882c94eecb1a2379a8e87b91e6c588f43ec1537 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 21 Nov 2020 23:51:18 -0500 Subject: [PATCH] fix: add missing help output --- plugins/logs/src/commands/commands.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/logs/src/commands/commands.go b/plugins/logs/src/commands/commands.go index e4f13c6ca..e6c81beb5 100644 --- a/plugins/logs/src/commands/commands.go +++ b/plugins/logs/src/commands/commands.go @@ -55,6 +55,16 @@ func main() { } case "logs:help": usage() + case "help": + command := common.NewShellCmd(fmt.Sprintf("ps -o command= %d", os.Getppid())) + command.ShowOutput = false + output, err := command.Output() + + if err == nil && strings.Contains(string(output), "--all") { + fmt.Println(helpContent) + } else { + fmt.Print("\n logs, Manage log integration for an app\n") + } default: dokkuNotImplementExitCode, err := strconv.Atoi(os.Getenv("DOKKU_NOT_IMPLEMENTED_EXIT")) if err != nil {