From c6d32bd1bb8cf611fd132f6bed156eee57e75d43 Mon Sep 17 00:00:00 2001 From: Edd Robinson Date: Tue, 15 Dec 2015 20:39:48 +0000 Subject: [PATCH] Fix #5127 --- cmd/influx/cli/cli.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/influx/cli/cli.go b/cmd/influx/cli/cli.go index 04bb55ebae..b1f9f9c2d1 100644 --- a/cmd/influx/cli/cli.go +++ b/cmd/influx/cli/cli.go @@ -103,6 +103,9 @@ func (c *CommandLine) Run() error { c.Client.Addr()) } + // Modify precision. + c.SetPrecision(c.Precision) + if c.Execute == "" && !c.Import { token, err := c.DatabaseToken() if err != nil { @@ -115,9 +118,6 @@ func (c *CommandLine) Run() error { } if c.Execute != "" { - // Modify precision before executing query - c.SetPrecision(c.Precision) - // Make the non-interactive mode send everything through the CLI's parser // the same way the interactive mode works lines := strings.Split(c.Execute, "\n") @@ -728,7 +728,7 @@ func (c *CommandLine) help() { fmt.Println(`Usage: connect connects to another node specified by host:port auth prompts for username and password - pretty toggles pretty print for the json format + pretty toggles pretty print for the json format use sets current database format specifies the format of the server responses: json, csv, or column precision specifies the format of the timestamp: rfc3339, h, m, s, ms, u or ns