Skip to content

Commit

Permalink
fix(remote): TASK_REMOTE_DIR does not work when absolute (#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaerten authored Aug 25, 2024
1 parent 32158da commit c243b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ func (e *Executor) setupTempDir() error {
}

if os.Getenv("TASK_REMOTE_DIR") != "" {
if filepath.IsAbs(os.Getenv("TASK_TEMP_DIR")) || strings.HasPrefix(os.Getenv("TASK_TEMP_DIR"), "~") {
remoteTempDir, err := execext.Expand(filepathext.SmartJoin(e.Dir, ".task"))
if filepath.IsAbs(os.Getenv("TASK_REMOTE_DIR")) || strings.HasPrefix(os.Getenv("TASK_REMOTE_DIR"), "~") {
remoteTempDir, err := execext.Expand(os.Getenv("TASK_REMOTE_DIR"))
if err != nil {
return err
}
Expand Down

0 comments on commit c243b0e

Please sign in to comment.