mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Go: Fix err being shadowed in RunListWithEnv
This commit is contained in:
@@ -194,8 +194,8 @@ func RunListWithEnv(format string, patterns []string, additionalEnv []string, fl
|
||||
out, err := cmd.Output()
|
||||
|
||||
if err != nil {
|
||||
if err, ok := err.(*exec.ExitError); ok {
|
||||
log.Printf("Warning: go list command failed, output below:\nstdout:\n%s\nstderr:\n%s\n", out, err.Stderr)
|
||||
if exitErr, ok := err.(*exec.ExitError); ok {
|
||||
log.Printf("Warning: go list command failed, output below:\nstdout:\n%s\nstderr:\n%s\n", out, exitErr.Stderr)
|
||||
} else {
|
||||
log.Printf("Warning: Failed to run go list: %s", err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user