Skip to content

Commit

Permalink
Fix XK6_K6_REPO after the move to go mod edit
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Aug 19, 2021
1 parent 94cc864 commit 34d4383
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ func (b Builder) newEnvironment(ctx context.Context) (*environment, error) {
if err != nil {
return nil, err
}
// tidy the module to ensure go.mod will not have versions such as `latest`
tidyCmd := env.newCommand("go", "mod", "tidy")
if err := env.runCommand(ctx, tidyCmd, b.TimeoutGet); err != nil {
return nil, err
}
replace := fmt.Sprintf("%s=%s", k6ModulePath, b.K6Repo)
if b.K6Version != "" {
replace = fmt.Sprintf("%s@%s", replace, b.K6Version)
Expand Down

0 comments on commit 34d4383

Please sign in to comment.