From 596ef3bc44f73b34aeb385fb94b29e9c22857614 Mon Sep 17 00:00:00 2001 From: Zvonimir Pavlinovic Date: Fri, 10 Dec 2021 09:13:33 -0800 Subject: [PATCH] govulncheck: use proper go env variables everywhere Change-Id: I5c47125f00c1f99688e1bd6bfd57b720c99c7261 Reviewed-on: https://go-review.googlesource.com/c/exp/+/370914 Run-TryBot: Zvonimir Pavlinovic TryBot-Result: Gopher Robot Reviewed-by: Hyang-Ah Hana Kim Trust: Zvonimir Pavlinovic --- vulndb/govulncheck/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vulndb/govulncheck/main.go b/vulndb/govulncheck/main.go index d94dc75..5934976 100644 --- a/vulndb/govulncheck/main.go +++ b/vulndb/govulncheck/main.go @@ -234,7 +234,7 @@ func run(cfg *packages.Config, patterns []string, importsOnly bool, dbClient cli if err != nil { return nil, fmt.Errorf("failed to fetch vulnerabilities: %v", err) } - modVulns = modVulns.Filter(runtime.GOOS, runtime.GOARCH) + modVulns = modVulns.Filter(lookupEnv("GOOS", runtime.GOOS), lookupEnv("GOARCH", runtime.GOARCH)) if *verboseFlag { log.Printf("\t%d known vulnerabilities.\n", modVulns.Num()) }