Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(influx): disable failing when providing an unexpected flag to influx CLI #18335

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
5 changes: 5 additions & 0 deletions cmd/influx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down