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) {
return exitCondition(ev)
})
result = ev.Object.(*api.Pod)
if ev != nil {
result = ev.Object.(*api.Pod)
}
return err
})
return result, err