summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@gitlab.com>2019-08-08 16:19:55 +0000
committerTomasz Maczukin <tomasz@gitlab.com>2019-08-08 16:19:55 +0000
commitfc6f2571a67f937b7bcd7650e6ff9f7173879006 (patch)
tree118b4e482f972538991b3f41c6b29bc0671f2c89 /common
parentMerge branch 'docs-fix-link' into 'master' (diff)
parentauthConfigs can not be nil because it is created using make above. (diff)
downloadgitlab-runner-master.tar.gz
Merge branch 'suspicious-condition' into 'master'HEADmaster
Removal of conditions which are always evaluated either to true or false See merge request gitlab-org/gitlab-runner!1517
Diffstat (limited to 'common')
-rw-r--r--common/build.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/build.go b/common/build.go
index fa11ef1b..14ddb467 100644
--- a/common/build.go
+++ b/common/build.go
@@ -389,10 +389,8 @@ func (b *Build) retryCreateExecutor(options ExecutorPrepareOptions, provider Exe
if err == nil {
break
}
- if executor != nil {
- executor.Cleanup()
- executor = nil
- }
+ executor.Cleanup()
+ executor = nil
if _, ok := err.(*BuildError); ok {
break
} else if options.Context.Err() != nil {