Skip to content

Commit 05958cb

Browse files
ianthehatjulieqiu
authored andcommitted
internal/scan: trim the newlines off the GoVersion
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>
1 parent 2dd8d10 commit 05958cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/scan/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func prepareConfig(ctx context.Context, cfg *config, client *client.Client) {
8282
}
8383
if cfg.GoVersion == "" {
8484
if out, err := exec.Command("go", "env", "GOVERSION").Output(); err == nil {
85-
cfg.GoVersion = string(out)
85+
cfg.GoVersion = strings.TrimSpace(string(out))
8686
}
8787
}
8888
}

0 commit comments

Comments
 (0)