fix(shell): fix deprecation warning

This commit is contained in:
Andrey Nering
2026-01-21 14:02:37 -03:00
parent edb491a4d0
commit da7eb0c855

View File

@@ -127,12 +127,8 @@ func ExpandFields(s string) ([]string, error) {
s = escape(s)
p := syntax.NewParser()
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)
return true
})
if err != nil {
return nil, err
}
cfg := &expand.Config{
Env: expand.FuncEnviron(os.Getenv),