]> Cypherpunks repositories - gostls13.git/commit
cmd/go: do not ignore permission errors when matching patterns
authorBryan C. Mills <bcmills@google.com>
Wed, 6 May 2020 20:22:15 +0000 (16:22 -0400)
committerBryan C. Mills <bcmills@google.com>
Wed, 13 May 2020 18:51:10 +0000 (18:51 +0000)
commit14bec27743365511495eadb2accf76efaccbc525
tree5af6e61b7e5e5633750688e6869b16aeff19ff1f
parentb819adfe6d3bb53b1c863d5c5a8b64b89698d9f7
cmd/go: do not ignore permission errors when matching patterns

While reviewing CL 228784, I noticed that various filepath.WalkFunc
implementations within cmd/go were dropping non-nil errors.

Those errors turn out to be significant, at least in some cases: for
example, they can cause packages to appear to be missing when any
parent of the directory had the wrong permissions set.

(This also turned up a bug in the existing list_dedup_packages test,
which was accidentally passing a nonexistent directory instead of the
intended duplicate path.)

Change-Id: Ia09a0a33aa7a966d9f132d3747d6c674a5370b2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/232579
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/go_test.go
src/cmd/go/internal/modget/get.go
src/cmd/go/internal/modload/import.go
src/cmd/go/internal/modload/load.go
src/cmd/go/internal/modload/query.go
src/cmd/go/internal/modload/search.go
src/cmd/go/internal/search/search.go
src/cmd/go/testdata/script/list_dedup_packages.txt
src/cmd/go/testdata/script/list_gofile_in_goroot.txt
src/cmd/go/testdata/script/list_permissions.txt [new file with mode: 0644]