As a general convention, command-line options should override environment variables because
environment variables are non-specific, whereas command-line options apply only to that single
command invocation.
This does not appear to be the case with the influx command.
Here's an example:
$ export INFLUX_ORG_ID=844910ece80be8bc
$ influx write -b devbucket -o 9c5955fc99a60b8f --host https://rog.remocal.influxdev.co/ < /tmp/x.lp
Error: failed to write data: 404 Not Found: organization not found
$ unset INFLUX_ORG_ID
$ influx write -b devbucket -o 9c5955fc99a60b8f --host https://rog.remocal.influxdev.co/ < /tmp/x.lp
$
As a general convention, command-line options should override environment variables because environment variables are non-specific, whereas command-line options apply only to that single command invocation.
This does not appear to be the case with the
influx
command.Here's an example: