@@ -93,12 +93,9 @@ func (e *Executor) setupFuzzyModel() {
93
93
model .SetThreshold (1 ) // because we want to build grammar based on every task name
94
94
95
95
var words []string
96
- for _ , taskName := range e .Taskfile .Tasks .Keys () {
97
- words = append (words , taskName )
98
-
99
- for _ , task := range e .Taskfile .Tasks .Values () {
100
- words = slices .Concat (words , task .Aliases )
101
- }
96
+ for name , task := range e .Taskfile .Tasks .All (nil ) {
97
+ words = append (words , name )
98
+ words = slices .Concat (words , task .Aliases )
102
99
}
103
100
104
101
model .Train (words )
@@ -215,12 +212,11 @@ func (e *Executor) readDotEnvFiles() error {
215
212
return err
216
213
}
217
214
218
- err = env . Range ( func ( key string , value ast. Var ) error {
219
- if _ , ok := e .Taskfile .Env .Get (key ); ! ok {
220
- e .Taskfile .Env .Set (key , value )
215
+ for k , v := range env . All () {
216
+ if _ , ok := e .Taskfile .Env .Get (k ); ! ok {
217
+ e .Taskfile .Env .Set (k , v )
221
218
}
222
- return nil
223
- })
219
+ }
224
220
return err
225
221
}
226
222
@@ -238,7 +234,7 @@ func (e *Executor) setupConcurrencyState() {
238
234
239
235
e .taskCallCount = make (map [string ]* int32 , e .Taskfile .Tasks .Len ())
240
236
e .mkdirMutexMap = make (map [string ]* sync.Mutex , e .Taskfile .Tasks .Len ())
241
- for _ , k := range e .Taskfile .Tasks .Keys () {
237
+ for k := range e .Taskfile .Tasks .Keys (nil ) {
242
238
e .taskCallCount [k ] = new (int32 )
243
239
e .mkdirMutexMap [k ] = & sync.Mutex {}
244
240
}
0 commit comments