remove empty string output

This commit is contained in:
beanjs 2022-07-27 18:03:52 +08:00
parent b937d64a58
commit f4561e1d94

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:
}
}