mirror of
https://github.com/go-task/task.git
synced 2026-07-09 06:55:14 +00:00
fix(shell): fix deprecation warning
This commit is contained in:
@@ -127,12 +127,8 @@ func ExpandFields(s string) ([]string, error) {
|
|||||||
s = escape(s)
|
s = escape(s)
|
||||||
p := syntax.NewParser()
|
p := syntax.NewParser()
|
||||||
var words []*syntax.Word
|
var words []*syntax.Word
|
||||||
err := p.Words(strings.NewReader(s), func(w *syntax.Word) bool {
|
for w := range p.WordsSeq(strings.NewReader(s)) {
|
||||||
words = append(words, w)
|
words = append(words, w)
|
||||||
return true
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
cfg := &expand.Config{
|
cfg := &expand.Config{
|
||||||
Env: expand.FuncEnviron(os.Getenv),
|
Env: expand.FuncEnviron(os.Getenv),
|
||||||
|
|||||||
Reference in New Issue
Block a user