mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #10402 from markmc/interactive-watch-panic
etcdctl: fix interactive mode panic
This commit is contained in:
commit
a00bff7848
@ -101,6 +101,10 @@ func watchInteractiveFunc(cmd *cobra.Command, osArgs []string, envKey, envRange
|
||||
l = strings.TrimSuffix(l, "\n")
|
||||
|
||||
args := argify(l)
|
||||
if len(args) < 1 {
|
||||
fmt.Fprintf(os.Stderr, "Invalid command: %s (watch and progress supported)\n", l)
|
||||
continue
|
||||
}
|
||||
switch args[0] {
|
||||
case "watch":
|
||||
if len(args) < 2 && envKey == "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user