1
0
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:
Alexander Mancevice 2021-09-05 08:18:47 -04:00
parent 0a6833e9d8
commit c892d055ed
No known key found for this signature in database
GPG Key ID: EEE46D60A89CAF4D

View File

@ -10,6 +10,7 @@ import (
"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/taskfile"
)
@ -53,7 +54,7 @@ func Taskfile(dir string, entrypoint string) (*taskfile.Taskfile, error) {
if filepath.IsAbs(includedTask.Taskfile) {
path = includedTask.Taskfile
} else if strings.HasPrefix(includedTask.Taskfile, "~") {
home, err := os.UserHomeDir()
home, err := execext.Expand("~")
if err != nil {
return err
}