mirror of
https://github.com/burrowers/garble.git
synced 2025-12-24 12:58:05 +08:00
use -mod=readonly rather than -mod= for go list
The empty string is not a valid value for the -mod flag, and it fails when using a workspace too:
go: -mod may only be set to readonly or vendor when in workspace mode, but it is set to ""
This commit is contained in:
@@ -231,7 +231,7 @@ func appendListedPackages(packages []string, mainBuild bool) error {
|
||||
// However, when loading standard library packages,
|
||||
// using those flags would likely result in an error,
|
||||
// as the standard library uses its own Go module and vendoring.
|
||||
args = append(args, "-mod=", "-modfile=")
|
||||
args = append(args, "-mod=readonly", "-modfile=")
|
||||
}
|
||||
|
||||
args = append(args, packages...)
|
||||
|
||||
Reference in New Issue
Block a user