mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
Expand environment variables on "dir", "sources" and "generates"
So a path like this works: $GOPATH/src/github.com/go-task/task
Allowing of "~" was also implemented. See #74 and baac067a1a
Fixes #116
This commit is contained in:
@@ -3,10 +3,9 @@ package task
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/go-task/task/internal/osext"
|
||||
"github.com/go-task/task/internal/taskfile"
|
||||
"github.com/go-task/task/internal/templater"
|
||||
|
||||
"github.com/mitchellh/go-homedir"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -41,7 +40,7 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
|
||||
Method: r.Replace(origTask.Method),
|
||||
Prefix: r.Replace(origTask.Prefix),
|
||||
}
|
||||
new.Dir, err = homedir.Expand(new.Dir)
|
||||
new.Dir, err = osext.Expand(new.Dir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user