1
0
mirror of https://github.com/go-task/task.git synced 2025-11-06 09:09:13 +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

@@ -4,9 +4,8 @@ import (
"path/filepath"
"sort"
"github.com/go-task/task/internal/osext"
"github.com/mattn/go-zglob"
"mvdan.cc/sh/shell"
)
func glob(dir string, globs []string) (files []string, err error) {
@@ -14,7 +13,7 @@ func glob(dir string, globs []string) (files []string, err error) {
if !filepath.IsAbs(g) {
g = filepath.Join(dir, g)
}
g, err = osext.Expand(g)
g, err = shell.Expand(g, nil)
if err != nil {
return nil, err
}