diff options
| author | Jonathan Amsterdam <jba@google.com> | 2022-08-25 09:00:45 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2022-08-26 16:06:54 +0000 |
| commit | 4dd4f8c4ef69631599277e9d2180b93b120d4082 (patch) | |
| tree | 62eda8d8af9b1562fd5154cd54a7805c4f1f7701 /cmd/pkgsite | |
| parent | c9a90aa51f1da43a2d129c15941a5970c00530ad (diff) | |
| download | go-x-pkgsite-4dd4f8c4ef69631599277e9d2180b93b120d4082.tar.xz | |
cmd/pkgsite: list modules read-only
Add -mod=readonly to the `go list` command that is run
so the command will work with vendor directories.
Change-Id: I5baa4b93f29f2c760d2fed03a3ea29f8382002f3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/425494
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'cmd/pkgsite')
| -rw-r--r-- | cmd/pkgsite/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/pkgsite/main.go b/cmd/pkgsite/main.go index 659fcdcf..c273c82b 100644 --- a/cmd/pkgsite/main.go +++ b/cmd/pkgsite/main.go @@ -242,7 +242,7 @@ type listedMod struct { var listModules = _listModules func _listModules(dir string) ([]listedMod, error) { - out, err := runGo(dir, "list", "-json", "-m", "all") + out, err := runGo(dir, "list", "-json", "-m", "-mod", "readonly", "all") if err != nil { return nil, err } |
