From 1730102a178501ffce47b0e9f48e76141b4c4138 Mon Sep 17 00:00:00 2001 From: Johnny Steenbergen Date: Tue, 2 Jun 2020 11:45:30 -0700 Subject: [PATCH] chore(influx): disable failing when providing an unexpected error to influx CLI closes: #18290 --- CHANGELOG.md | 1 + cmd/influx/main.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9bc0014599..19cf3cb2199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Bug Fixes 1. [18331](https://github.com/influxdata/influxdb/pull/18331): Support organization name in addition to ID in DBRP operations +1. [18335](https://github.com/influxdata/influxdb/pull/18335): Disable failing when providing an unexpected error to influx CLI ## v2.0.0-beta.11 [2020-05-26] diff --git a/cmd/influx/main.go b/cmd/influx/main.go index 07ff2b6f37b..e6af77e6661 100644 --- a/cmd/influx/main.go +++ b/cmd/influx/main.go @@ -74,6 +74,11 @@ func (o genericCLIOpts) newCmd(use string, runE func(*cobra.Command, []string) e Args: cobra.NoArgs, Use: use, RunE: runE, + FParseErrWhitelist: cobra.FParseErrWhitelist{ + // allows for unknown flags, parser does not crap the bed + // when providing a flag that doesn't exist/match. + UnknownFlags: true, + }, } canWrapRunE := runE != nil && o.runEWrapFn != nil