Skip to content

Commit

Permalink
Fix arg syntax if version is omitted
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Apr 13, 2020
1 parent dcc00b0 commit 681037f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ func (env environment) runCommand(ctx context.Context, cmd *exec.Cmd, timeout ti
}

func (env environment) execGoGet(ctx context.Context, modulePath, moduleVersion string) error {
mod := modulePath + "@" + moduleVersion
mod := modulePath
if moduleVersion != "" {
mod += "@" + moduleVersion
}
cmd := env.newCommand("go", "get", "-d", "-v", mod)
return env.runCommand(ctx, cmd, 5*time.Minute)
}
Expand Down

0 comments on commit 681037f

Please sign in to comment.