From cac55a1e800fbc2af59c305a28b3ca1013ef44bf Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Thu, 5 Oct 2017 17:21:46 +0200 Subject: [PATCH] command: don't show confusing error on usage output --- command/agent.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/agent.go b/command/agent.go index 411cea597..18c7ceb37 100644 --- a/command/agent.go +++ b/command/agent.go @@ -54,7 +54,9 @@ func (cmd *AgentCommand) readConfig() *config.RuntimeConfig { config.AddFlags(fs, &flags) if err := cmd.BaseCommand.Parse(cmd.args); err != nil { - cmd.UI.Error(fmt.Sprintf("error parsing flags: %v", err)) + if !strings.Contains(err.Error(), "help requested") { + cmd.UI.Error(fmt.Sprintf("error parsing flags: %v", err)) + } return nil }