Skip to content

Commit 4d6e336

Browse files
author
OpenShift Bot
authored
Merge pull request #12473 from weizhanxu/consistent_return_val
Merged by openshift-bot
2 parents 843f15c + e249de9 commit 4d6e336

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/build/registry/rest.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ func WaitForRunningBuild(watcher rest.Watcher, ctx kapi.Context, build *api.Buil
4343
observed = obj
4444

4545
if event.Type == watch.Deleted {
46-
return obj, false, ErrBuildDeleted
46+
return observed, false, ErrBuildDeleted
4747
}
4848
switch obj.Status.Phase {
4949
case api.BuildPhaseRunning, api.BuildPhaseComplete, api.BuildPhaseFailed, api.BuildPhaseError, api.BuildPhaseCancelled:
50-
return obj, true, nil
50+
return observed, true, nil
5151
case api.BuildPhaseNew, api.BuildPhasePending:
5252
default:
53-
return obj, false, ErrUnknownBuildPhase
53+
return observed, false, ErrUnknownBuildPhase
5454
}
5555
case <-expire:
5656
return observed, false, nil

0 commit comments

Comments
 (0)