Merge pull request #7702 from influxdata/cjl-6527-cli-precision-case-sensitive

fix precision being case sensitive in cli
pull/7705/head
Cory LaNou 2016-12-07 12:15:34 -06:00 committed by GitHub
commit 6f027ac60e
2 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,7 @@ The stress tool `influx_stress` will be removed in a subsequent release. We reco
- [#7650](https://github.com/influxdata/influxdb/issues/7650): Ensures that all user privileges associated with a database are removed when the database is dropped.
- [#7659](https://github.com/influxdata/influxdb/issues/7659): Fix CLI import bug when using self-signed SSL certificates.
- [#7698](https://github.com/influxdata/influxdb/pull/7698): CLI was caching db/rp for insert into statements.
- [#6527](https://github.com/influxdata/influxdb/issues/6527): 0.12.2 Influx CLI client PRECISION returns "Unknown precision....
- [#7396](https://github.com/influxdata/influxdb/issues/7396): CLI should use spaces for alignment, not tabs.

View File

@ -394,11 +394,12 @@ func (c *CommandLine) use(cmd string) {
// SetPrecision sets client precision
func (c *CommandLine) SetPrecision(cmd string) {
// Remove the "precision" keyword if it exists
cmd = strings.TrimSpace(strings.Replace(cmd, "precision", "", -1))
// normalize cmd
cmd = strings.ToLower(cmd)
// Remove the "precision" keyword if it exists
cmd = strings.TrimSpace(strings.Replace(cmd, "precision", "", -1))
switch cmd {
case "h", "m", "s", "ms", "u", "ns":
c.ClientConfig.Precision = cmd