mirror of
https://github.com/go-task/task.git
synced 2026-05-18 05:05:20 +02:00
fix: avoid panic after calling WordsSeq (#2810)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
`:` elsewhere (#2406, #2408 by @solvingj).
|
||||
- Update the shell interpreter with a regression fix (#2812, #2832 by
|
||||
@andreynering).
|
||||
- Fix potential panic with the shell interpreter (#2810 by @trulede).
|
||||
|
||||
## v3.50.0 - 2026-04-13
|
||||
|
||||
|
||||
@@ -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