Fix crash in kubectl run

This commit is contained in:
Ivan Shvedunov 2017-04-13 01:00:50 +03:00
parent 1b85aed461
commit b62af04f7f

View File

@ -413,7 +413,9 @@ func waitForPod(podClient coreclient.PodsGetter, ns, name string, exitCondition
ev, err := watch.Until(0, w, func(ev watch.Event) (bool, error) { ev, err := watch.Until(0, w, func(ev watch.Event) (bool, error) {
return exitCondition(ev) return exitCondition(ev)
}) })
if ev != nil {
result = ev.Object.(*api.Pod) result = ev.Object.(*api.Pod)
}
return err return err
}) })
return result, err return result, err