mirror of
https://github.com/go-task/task.git
synced 2024-12-04 10:24:45 +02:00
fix(remote): TASK_REMOTE_DIR does not work when absolute (#1715)
This commit is contained in:
parent
32158dac87
commit
c243b0ec7e
4
setup.go
4
setup.go
@ -134,8 +134,8 @@ func (e *Executor) setupTempDir() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if os.Getenv("TASK_REMOTE_DIR") != "" {
|
if os.Getenv("TASK_REMOTE_DIR") != "" {
|
||||||
if filepath.IsAbs(os.Getenv("TASK_TEMP_DIR")) || strings.HasPrefix(os.Getenv("TASK_TEMP_DIR"), "~") {
|
if filepath.IsAbs(os.Getenv("TASK_REMOTE_DIR")) || strings.HasPrefix(os.Getenv("TASK_REMOTE_DIR"), "~") {
|
||||||
remoteTempDir, err := execext.Expand(filepathext.SmartJoin(e.Dir, ".task"))
|
remoteTempDir, err := execext.Expand(os.Getenv("TASK_REMOTE_DIR"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user