fix(nix/buildGo): Do not silently ignore filepath.Walk() errors

This commit is contained in:
Vincent Ambo 2020-05-25 23:24:57 +01:00
parent 14b52848f8
commit 980bf5365c

View file

@ -44,6 +44,10 @@ func findGoDirs(at string) ([]string, error) {
dirSet := make(map[string]bool) dirSet := make(map[string]bool)
err := filepath.Walk(at, func(path string, info os.FileInfo, err error) error { err := filepath.Walk(at, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
name := info.Name() name := info.Name()
// Skip folders that are guaranteed to not be relevant // Skip folders that are guaranteed to not be relevant
if info.IsDir() && (name == "testdata" || name == ".git") { if info.IsDir() && (name == "testdata" || name == ".git") {