Skip to content

Commit 44bb1b1

Browse files
committed
fix build errors
1 parent 9806e72 commit 44bb1b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/lizard/lizardRunner.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ func RunLizard(workDirectory string, binary string, files []string, outputFile s
7474

7575
err = cmd.Run()
7676

77-
if stderr.Len() > 0 {
77+
if stderr.Len() > 0 && err != nil {
7878
logger.Debug("Failed to run Lizard: ", logrus.Fields{
79-
"error": err != nil ? err.Error() : "unknown error",
79+
"error": err.Error(),
8080
"stderr": string(stderr.Bytes()),
8181
})
8282

@@ -117,7 +117,7 @@ func RunLizard(workDirectory string, binary string, files []string, outputFile s
117117

118118
if stderr.Len() > 0 && err != nil {
119119
logger.Debug("Failed to run Lizard: ", logrus.Fields{
120-
"error": err != nil ? err.Error() : "unknown error",
120+
"error": err.Error(),
121121
"stderr": string(stderr.Bytes()),
122122
})
123123

0 commit comments

Comments
 (0)