1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

fix: .USER_WORKING_DIR should contain the value of --dir if given (#2186)

Closes #2102
Closes #2103

Co-authored-by: jaynis <kranz.jannis@googlemail.com>
This commit is contained in:
Andrey Nering
2025-04-18 22:27:30 -03:00
committed by GitHub
parent e65159f613
commit 768dca053b
4 changed files with 10 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"io"
"os"
"path/filepath"
"sync"
"time"
@@ -121,6 +122,7 @@ type dirOption struct {
}
func (o *dirOption) ApplyToExecutor(e *Executor) {
e.UserWorkingDir, _ = filepath.Abs(o.dir)
e.Dir = o.dir
}