command: don't show confusing error on usage output

This commit is contained in:
Frank Schroeder 2017-10-05 17:21:46 +02:00 committed by Frank Schröder
parent 4e866ced39
commit cac55a1e80
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ func (cmd *AgentCommand) readConfig() *config.RuntimeConfig {
config.AddFlags(fs, &flags)
if err := cmd.BaseCommand.Parse(cmd.args); err != nil {
if !strings.Contains(err.Error(), "help requested") {
cmd.UI.Error(fmt.Sprintf("error parsing flags: %v", err))
}
return nil
}