go/packages: fix mistake for ad-hoc packages
Change-Id: I6247e0392a43cf4c4f4ded8446e045dfcd8e423d Reviewed-on: https://go-review.googlesource.com/c/tools/+/183620 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
64633d5e86
commit
663943adaa
|
@ -231,7 +231,7 @@ func runContainsQueries(cfg *Config, driver driver, response *responseDeduper, q
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Couldn't find a package for the directory. Try to load the file as an ad-hoc package.
|
// Couldn't find a package for the directory. Try to load the file as an ad-hoc package.
|
||||||
var queryErr error
|
var queryErr error
|
||||||
dirResponse, err = driver(cfg, query)
|
dirResponse, queryErr = driver(cfg, query)
|
||||||
if queryErr != nil {
|
if queryErr != nil {
|
||||||
// Return the original error if the attempt to fall back failed.
|
// Return the original error if the attempt to fall back failed.
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue