1
0
mirror of https://github.com/go-task/task.git synced 2025-06-15 00:15:10 +02:00

Move path expanding logic to shell.Expand

This commit is contained in:
Andrey Nering
2018-07-15 15:37:20 -03:00
parent 18961e3d07
commit 67105b332f
5 changed files with 33 additions and 27 deletions

View File

@ -3,9 +3,10 @@ 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"
"mvdan.cc/sh/shell"
)
var (
@ -40,7 +41,7 @@ func (e *Executor) CompiledTask(call taskfile.Call) (*taskfile.Task, error) {
Method: r.Replace(origTask.Method),
Prefix: r.Replace(origTask.Prefix),
}
new.Dir, err = osext.Expand(new.Dir)
new.Dir, err = shell.Expand(new.Dir, nil)
if err != nil {
return nil, err
}