mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #3202 from yichengq/fix-etcdctl-watch
etcdctl: fix watch -after-index parsing
This commit is contained in:
commit
8bd9554338
@ -49,10 +49,7 @@ func watchCommandFunc(c *cli.Context, ki client.KeysAPI) {
|
|||||||
key := c.Args()[0]
|
key := c.Args()[0]
|
||||||
recursive := c.Bool("recursive")
|
recursive := c.Bool("recursive")
|
||||||
forever := c.Bool("forever")
|
forever := c.Bool("forever")
|
||||||
index := 0
|
index := c.Int("after-index")
|
||||||
if c.Int("after-index") != 0 {
|
|
||||||
index = c.Int("after-index") + 1
|
|
||||||
}
|
|
||||||
|
|
||||||
stop := false
|
stop := false
|
||||||
w := ki.Watcher(key, &client.WatcherOptions{AfterIndex: uint64(index), Recursive: recursive})
|
w := ki.Watcher(key, &client.WatcherOptions{AfterIndex: uint64(index), Recursive: recursive})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user