From 0c4a9165631d08ccdbcda20b1496d082d77c6c32 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 2 Jul 2023 10:41:54 +0200 Subject: [PATCH] [FORGEJO] no double / in WorkDir, it would fail local actions --- internal/app/run/runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/app/run/runner.go b/internal/app/run/runner.go index 54de420..ab34bf1 100644 --- a/internal/app/run/runner.go +++ b/internal/app/run/runner.go @@ -186,7 +186,7 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report. runnerConfig := &runner.Config{ // On Linux, Workdir will be like "///" // On Windows, Workdir will be like "\\\" - Workdir: filepath.FromSlash(fmt.Sprintf("/%s/%s", r.cfg.Container.WorkdirParent, preset.Repository)), + Workdir: filepath.FromSlash(filepath.Clean(fmt.Sprintf("/%s/%s", r.cfg.Container.WorkdirParent, preset.Repository))), BindWorkdir: false, ActionCacheDir: filepath.FromSlash(r.cfg.Host.WorkdirParent),