mirror of
https://github.com/go-task/task.git
synced 2026-06-11 09:51:50 +00:00
fix: avoid panic after calling WordsSeq (#2810)
This commit is contained in:
@@ -127,7 +127,10 @@ func ExpandFields(s string) ([]string, error) {
|
||||
s = escape(s)
|
||||
p := syntax.NewParser()
|
||||
var words []*syntax.Word
|
||||
for w := range p.WordsSeq(strings.NewReader(s)) {
|
||||
for w, err := range p.WordsSeq(strings.NewReader(s)) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
words = append(words, w)
|
||||
}
|
||||
cfg := &expand.Config{
|
||||
|
||||
Reference in New Issue
Block a user