mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
migrate/starter: fix --version output
This commit is contained in:
parent
38038e476a
commit
1ce7f6e0d0
@ -34,6 +34,7 @@ import (
|
||||
"github.com/coreos/etcd/pkg/flags"
|
||||
"github.com/coreos/etcd/pkg/osutil"
|
||||
"github.com/coreos/etcd/pkg/types"
|
||||
etcdversion "github.com/coreos/etcd/version"
|
||||
|
||||
"github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context"
|
||||
)
|
||||
@ -69,6 +70,10 @@ func StartDesiredVersion(args []string) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if fs.Lookup("version").Value.String() == "true" {
|
||||
fmt.Println("etcd version", etcdversion.Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
ver := checkInternalVersion(fs)
|
||||
log.Printf("starter: start etcd version %s", ver)
|
||||
@ -358,6 +363,8 @@ func (v *value) Set(s string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *value) IsBoolFlag() bool { return true }
|
||||
|
||||
// parseConfig parses out the input config from cmdline arguments and
|
||||
// environment variables.
|
||||
func parseConfig(args []string) (*flag.FlagSet, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user