Merge pull request #6458 from otoolep/fix_cli_version

Make it clear when CLI version is unknown
pull/6122/merge
Jonathan A. Sternberg 2016-04-23 09:11:14 -04:00
commit 40e234539b
3 changed files with 10 additions and 2 deletions

View File

@ -41,6 +41,7 @@
- [#6419](https://github.com/influxdata/influxdb/issues/6419): Fix panic in transform iterator on division. @thbourlove
- [#6109](https://github.com/influxdata/influxdb/issues/6109): Cache maximum memory size exceeded on startup
- [#6427](https://github.com/influxdata/influxdb/pull/6427): Fix setting uint config options via env vars
- [#6458](https://github.com/influxdata/influxdb/pull/6458): Make it clear when the CLI version is unknown.
- [#3883](https://github.com/influxdata/influxdb/issues/3883): Improve query sanitization to prevent a password leak in the logs.
## v0.12.1 [2016-04-08]

View File

@ -841,7 +841,7 @@ func (c *CommandLine) gopher() {
// Version prints CLI version
func (c *CommandLine) Version() {
fmt.Println("InfluxDB shell " + c.ClientVersion)
fmt.Println("InfluxDB shell version:", c.ClientVersion)
}
func (c *CommandLine) exit() {

View File

@ -11,7 +11,7 @@ import (
// These variables are populated via the Go linker.
var (
version = "0.9"
version string
)
const (
@ -26,6 +26,13 @@ const (
defaultPPS = 0
)
func init() {
// If version is not set, make that clear.
if version == "" {
version = "unknown"
}
}
func main() {
c := cli.New(version)