ctlv3: exit on exec watch error

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
release-3.4
Gyuho Lee 2018-01-16 09:04:46 -08:00
parent 72a2a6671e
commit 2c347d7158
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}
}
}