try to fix test 'cmdext:TestFailOnStderr'
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 39s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 39s
This commit is contained in:
@@ -133,9 +133,6 @@ func run(opt CommandRunner) (CommandResult, error) {
|
||||
|
||||
case <-stderrFailChan:
|
||||
_ = cmd.Process.Kill()
|
||||
for _, lstr := range opt.listener {
|
||||
lstr.Timeout()
|
||||
}
|
||||
|
||||
if fallback, ok := syncext.ReadChannelWithTimeout(outputChan, 32*time.Millisecond); ok {
|
||||
// most of the time the cmd.Process.Kill() should also have finished the pipereader
|
||||
@@ -160,7 +157,8 @@ func run(opt CommandRunner) (CommandResult, error) {
|
||||
}
|
||||
|
||||
case outobj := <-outputChan:
|
||||
if exiterr, ok := outobj.err.(*exec.ExitError); ok {
|
||||
var exiterr *exec.ExitError
|
||||
if errors.As(outobj.err, &exiterr) {
|
||||
excode := exiterr.ExitCode()
|
||||
for _, lstr := range opt.listener {
|
||||
lstr.Finished(excode)
|
||||
|
Reference in New Issue
Block a user