Use selected module for dependency downloads
This commit is contained in:
@@ -97,7 +97,7 @@ func New(ctx context.Context, directory string) (*Tool, error) {
|
||||
func PrepareBuildDependencies(ctx context.Context, directory string) error {
|
||||
captured := &combinedWriter{}
|
||||
err := process.Run(ctx, process.Invocation{
|
||||
Args: []string{"go", "mod", "download"},
|
||||
Args: []string{"go", "mod", "download", "-modfile="},
|
||||
Dir: directory,
|
||||
Env: map[string]string{
|
||||
"GOWORK": "off",
|
||||
|
||||
@@ -159,7 +159,7 @@ func TestPrepareBuildDependenciesPreservesPreparationEnvironment(t *testing.T) {
|
||||
if err := json.Unmarshal(contents, &record); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if strings.Join(record.Arguments, " ") != "mod download" || record.Directory != repository {
|
||||
if strings.Join(record.Arguments, " ") != "mod download -modfile=" || record.Directory != repository {
|
||||
t.Fatalf("Go invocation = %#v", record)
|
||||
}
|
||||
if record.Workspace != "off" || record.Toolchain != "local" {
|
||||
|
||||
Reference in New Issue
Block a user