remove empty string output (#198)

This commit is contained in:
WangJun 2022-12-07 13:35:59 +08:00 committed by GitHub
parent b937d64a58
commit 307409651f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,9 +127,13 @@ func (p Plugin) exec(host string, wg *sync.WaitGroup, errChannel chan error) {
case isTimeout = <-doneChan:
break loop
case outline := <-stdoutChan:
p.log(host, "out:", outline)
if outline != "" {
p.log(host, "out:", outline)
}
case errline := <-stderrChan:
p.log(host, "err:", errline)
if errline != "" {
p.log(host, "err:", errline)
}
case err = <-errChan:
}
}