improve workdir

This commit is contained in:
Zettat123 committed 2023-03-22 14:49:11 +08:00
1 parent 48b05a0ca8
commit 019493176b
1 file changed
+3 -1
+3 -1
View File
@@ -212,7 +212,9 @@ func (t *Task) Run(ctx context.Context, task *runnerv1.Task, runnerName, runnerV
input := t.Input
config := &runner.Config{
Workdir: "." + string(filepath.Separator),
// On Linux, Workdir will be like "/<owner>/<repo>"
// On Windows, Workdir will be like "\<owner>\<repo>"
Workdir: filepath.FromSlash(string(filepath.Separator) + preset.Repository),
BindWorkdir: false,
ReuseContainers: false,
ForcePull: input.forcePull,