Skip to content

Commit

Permalink
Catch race condition bug
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed May 2, 2024
1 parent e35571b commit fe36861
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion file.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ func (f *FileWalker) Start() error {
if len(f.directories) != 0 {
eg := errgroup.Group{}
for _, directory := range f.directories {
d := directory // capture var
eg.Go(func() error {
return f.walkDirectoryRecursive(directory, []gitignore.GitIgnore{}, []gitignore.GitIgnore{})
return f.walkDirectoryRecursive(d, []gitignore.GitIgnore{}, []gitignore.GitIgnore{})
})
}

Expand Down

0 comments on commit fe36861

Please sign in to comment.