From 2c347d715835af0ca584da0cfdac4d63b7bdb288 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Tue, 16 Jan 2018 09:04:46 -0800 Subject: [PATCH] ctlv3: exit on exec watch error Signed-off-by: Gyuho Lee --- etcdctl/ctlv3/command/watch_command.go | 1 + 1 file changed, 1 insertion(+) diff --git a/etcdctl/ctlv3/command/watch_command.go b/etcdctl/ctlv3/command/watch_command.go index e546eb8dc..19b461e28 100644 --- a/etcdctl/ctlv3/command/watch_command.go +++ b/etcdctl/ctlv3/command/watch_command.go @@ -163,6 +163,7 @@ func printWatchCh(c *clientv3.Client, ch clientv3.WatchChan, execArgs []string) cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr if err := cmd.Run(); err != nil { fmt.Fprintf(os.Stderr, "command %q error (%v)\n", execArgs, err) + os.Exit(1) } } }