influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.65k stars 3.54k forks source link

influx CLI: invalid flags are simply ignored; no error/warning given #18629

Closed wfjm closed 4 years ago

wfjm commented 4 years ago

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. docker run ... quay.io/influxdb/influxdb:2.0.0-beta
  2. docker exec -it influxdbv2 bash
  3. influx ping --badflag

Expected behavior: When influx is called with invalid flags the command should be abort with a proper error message.

Actual behavior: The invalid flag is simply ignored

influx ping --badflag  
OK

Environment info:

jsteenb2 commented 4 years ago

hi @wfjm thanks for the issue 👍. Can you share the exact error message you are receiving?

wfjm commented 4 years ago

The point is that no error message is given, invalid flags are simply ignored. This is a bit unusual for CLI tools, usually they complain about invalid flags. Good practice to catch typos.

jsteenb2 commented 4 years ago

that's fair, we've had user requests to explicitly remove the error when providing flags that aren't expected. They basically get ignored silently.