summaryrefslogtreecommitdiff
path: root/user/gitlab-runner/clean-tmpdirs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/gitlab-runner/clean-tmpdirs.patch')
-rw-r--r--user/gitlab-runner/clean-tmpdirs.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/user/gitlab-runner/clean-tmpdirs.patch b/user/gitlab-runner/clean-tmpdirs.patch
new file mode 100644
index 000000000..89efd7a22
--- /dev/null
+++ b/user/gitlab-runner/clean-tmpdirs.patch
@@ -0,0 +1,21 @@
+Backport of: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1978
+
+--- gitlab-runner-v12.1.0/executors/custom/executor.go 2019-07-19 12:13:32.000000000 +0000
++++ gitlab-runner-v12.1.0/executors/custom/executor.go 2020-04-27 00:19:46.613372635 +0000
+@@ -7,6 +7,7 @@ import (
+ "fmt"
+ "io"
+ "io/ioutil"
++ "os"
+ "path/filepath"
+
+ "github.com/sirupsen/logrus"
+@@ -216,6 +217,8 @@ func (e *executor) Cleanup() {
+ return
+ }
+
++ defer os.RemoveAll(e.tempDir)
++
+ // nothing to do, as there's no cleanup_script
+ if e.config.CleanupExec == "" {
+ return