fix: Print server errors to the stdout
otherwise we may not see things like:
```
listen tcp 0.0.0.0:8081: bind: address already in use
```
and spend a day debugging it :(
package acceptance_test
import (
- "bytes"
"fmt"
"net/http"
"os"
@@ -51,11 +50,12 @@ func startCarrierServer(port int) (*kexec.KCommand, error) {
p := kexec.CommandString(cmd)
- var b bytes.Buffer
- p.Stdout = &b
- p.Stderr = &b
+ p.Stdout = os.Stdout
+ p.Stderr = os.Stdout
p.Dir = commandDir
- p.Start()
+ if err = p.Start(); err != nil {
+ return nil, err
+ }
return p, nil
}
