mirror of
https://github.com/go-task/task.git
synced 2025-03-21 21:27:07 +02:00
Use internal execext.Expand to expand ~ in includes
This commit is contained in:
parent
0a6833e9d8
commit
c892d055ed
@ -10,6 +10,7 @@ import (
|
|||||||
|
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
|
"github.com/go-task/task/v3/internal/execext"
|
||||||
"github.com/go-task/task/v3/internal/templater"
|
"github.com/go-task/task/v3/internal/templater"
|
||||||
"github.com/go-task/task/v3/taskfile"
|
"github.com/go-task/task/v3/taskfile"
|
||||||
)
|
)
|
||||||
@ -53,7 +54,7 @@ func Taskfile(dir string, entrypoint string) (*taskfile.Taskfile, error) {
|
|||||||
if filepath.IsAbs(includedTask.Taskfile) {
|
if filepath.IsAbs(includedTask.Taskfile) {
|
||||||
path = includedTask.Taskfile
|
path = includedTask.Taskfile
|
||||||
} else if strings.HasPrefix(includedTask.Taskfile, "~") {
|
} else if strings.HasPrefix(includedTask.Taskfile, "~") {
|
||||||
home, err := os.UserHomeDir()
|
home, err := execext.Expand("~")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user