Fix error check in examples/custom-controller

Fixes #669
This commit is contained in:
Luit van Drongelen 2017-04-28 13:57:46 +02:00
parent 4555a64572
commit ff72c4f1e6

View file

@ -39,10 +39,9 @@ func (dc DummyController) SetConfig(cfgMap *api.ConfigMap) {
func (dc DummyController) Reload(data []byte) ([]byte, bool, error) { func (dc DummyController) Reload(data []byte) ([]byte, bool, error) {
out, err := exec.Command("echo", string(data)).CombinedOutput() out, err := exec.Command("echo", string(data)).CombinedOutput()
if err != nil { if err != nil {
log.Printf("Reloaded new config %s", out)
} else {
return out, false, err return out, false, err
} }
log.Printf("Reloaded new config %s", out)
return out, true, err return out, true, err
} }