diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T22·24+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T22·24+0100 |
commit | 980bf5365c8ad32a0305843f6abbb756b69d806e (patch) | |
tree | fa1b11b31dca19b1383e344d4ffcddf6be92df24 /nix | |
parent | 14b52848f8a7dc30a2e13c4f16e4fb8d777365f1 (diff) |
fix(nix/buildGo): Do not silently ignore filepath.Walk() errors r/848
Diffstat (limited to 'nix')
-rw-r--r-- | nix/buildGo/external/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nix/buildGo/external/main.go b/nix/buildGo/external/main.go index aa4a813d32bd..0bb9fc79ae92 100644 --- a/nix/buildGo/external/main.go +++ b/nix/buildGo/external/main.go @@ -44,6 +44,10 @@ func findGoDirs(at string) ([]string, error) { dirSet := make(map[string]bool) err := filepath.Walk(at, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + name := info.Name() // Skip folders that are guaranteed to not be relevant if info.IsDir() && (name == "testdata" || name == ".git") { |