fix: remove false positive for no-discovery cmp; log string, not bytes (#13251)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
This commit is contained in:
Michael Crenshaw 2023-04-24 19:58:48 +02:00 committed by GitHub
parent edf9916e39
commit af5bb44add
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ type Discover struct {
}
func (d Discover) IsDefined() bool {
return d.FileName != "" || d.Find.Glob == "" || len(d.Find.Command.Command) > 0
return d.FileName != "" || d.Find.Glob != "" || len(d.Find.Command.Command) > 0
}
// Command holds binary path and arguments list

View file

@ -113,7 +113,7 @@ func runCommand(ctx context.Context, command Command, path string, env []string)
}
if len(output) == 0 {
log.WithFields(log.Fields{
"stderr": stderr,
"stderr": stderr.String(),
"command": command,
}).Warn("Plugin command returned zero output")
}