Remove stderr reading (caused bug)
This commit is contained in:
parent
3822e854b6
commit
d35167b878
@ -23,22 +23,10 @@ func cmdStdout(commandline []string) chan *string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Fatalln("couldn't open stdout on command:", err)
|
logger.Fatalln("couldn't open stdout on command:", err)
|
||||||
}
|
}
|
||||||
stderr, err := cmd.StderrPipe()
|
|
||||||
if err != nil {
|
|
||||||
logger.Fatalln("couldn't open stderr on command:", err)
|
|
||||||
}
|
|
||||||
if err := cmd.Start(); err != nil {
|
if err := cmd.Start(); err != nil {
|
||||||
logger.Fatalln("couldn't start command:", err)
|
logger.Fatalln("couldn't start command:", err)
|
||||||
}
|
}
|
||||||
defer stdout.Close()
|
defer stdout.Close()
|
||||||
defer stderr.Close()
|
|
||||||
func() {
|
|
||||||
errscan := bufio.NewScanner(stderr)
|
|
||||||
for errscan.Scan() {
|
|
||||||
line := errscan.Text()
|
|
||||||
logger.Println(logger.WARN, "stderr:", line)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
scanner := bufio.NewScanner(stdout)
|
scanner := bufio.NewScanner(stdout)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := scanner.Text()
|
line := scanner.Text()
|
||||||
|
Loading…
Reference in New Issue
Block a user