Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/packages: suppress go list -e error when directory outside modules
If an absolute directory path being listed is outside any modules, go list -e returns a non-zero exit status and non-empty stderr, but should suppress the error. This was causing a weird bug when golang.org/cl/186337 was submitted because that changed the conditions when -export was passed, which in turn affected how we suppressed the go list -e error (because -export causes a compile it overtriggers errors, so we explicitly suppress errors in that case). The way the error was being suppressed, no error was generated, and no fake package was generated (which go list is supposed to do), so the contains query fallback code wasn't run. Fixes golang/go#34265 Updates golang/go#34273 Change-Id: I1213cff0e03a62c6976e50db5b2d805aa3ddbb7a Reviewed-on: https://go-review.googlesource.com/c/tools/+/195065 Run-TryBot: Michael Matloob <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
- Loading branch information