Skip to content

Commit

Permalink
internal/scan: trim the newlines off the GoVersion
Browse files Browse the repository at this point in the history
Fixes golang/go#61330

Change-Id: I778cec302f71baeb3b7d3ddb4fdbf492f5079bf2
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/509275
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Auto-Submit: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
ianthehat authored and julieqiu committed Jul 13, 2023
1 parent 2dd8d10 commit 05958cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/scan/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func prepareConfig(ctx context.Context, cfg *config, client *client.Client) {
}
if cfg.GoVersion == "" {
if out, err := exec.Command("go", "env", "GOVERSION").Output(); err == nil {
cfg.GoVersion = string(out)
cfg.GoVersion = strings.TrimSpace(string(out))
}
}
}
Expand Down

0 comments on commit 05958cb

Please sign in to comment.