mirror of
https://github.com/go-task/task.git
synced 2025-11-06 09:09:13 +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:
@@ -4,8 +4,9 @@ import (
|
||||
"path/filepath"
|
||||
"sort"
|
||||
|
||||
"github.com/go-task/task/internal/osext"
|
||||
|
||||
"github.com/mattn/go-zglob"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
)
|
||||
|
||||
func glob(dir string, globs []string) (files []string, err error) {
|
||||
@@ -13,7 +14,7 @@ func glob(dir string, globs []string) (files []string, err error) {
|
||||
if !filepath.IsAbs(g) {
|
||||
g = filepath.Join(dir, g)
|
||||
}
|
||||
g, err = homedir.Expand(g)
|
||||
g, err = osext.Expand(g)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user