From 80d5d233b368889741841e300cdd40ccc6eeedff Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 20 Apr 2023 00:56:03 +0200 Subject: [PATCH] Local Backend should create SubDirs (#1706) close #1705 --- pipeline/backend/local/local.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pipeline/backend/local/local.go b/pipeline/backend/local/local.go index aa166aa18..9f1695388 100644 --- a/pipeline/backend/local/local.go +++ b/pipeline/backend/local/local.go @@ -68,8 +68,15 @@ func (e *local) IsAvailable(context.Context) bool { func (e *local) Load(context.Context) error { dir, err := os.MkdirTemp("", "woodpecker-local-*") + if err != nil { + return err + } e.workflowBaseDir = dir - return err + + if err := os.Mkdir(filepath.Join(e.workflowBaseDir, workingSubDir), 0o700); err != nil { + return err + } + return os.Mkdir(filepath.Join(e.workflowBaseDir, homeSubDir), 0o700) } // Setup the pipeline environment.