Commit 89df0354 authored by Jay Conrod's avatar Jay Conrod
Browse files

cmd/go: fix errors for commands run outside of modules

Since CL 148517, several commands (including list and get) work when
GO111MODULE=on even when no go.mod file is present. This broke an
assumption made by "fix" and "generate" which caused panics when run
with a list of .go files (whether or not the command was run inside a
module).

This change fixes those assumptions and adds test cases for other
commands run outside modules.

Fixes #29097

Change-Id: I7927559769c5d4617d73eb63f3b17e2f26d8c219
Reviewed-on: https://go-review.googlesource.com/c/153158


Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
parent 6182d082
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment