Skip to content

Commit

Permalink
[QE] fix can't catch error after execute shell cmd, #4101
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyLuLiu committed Jun 24, 2024
1 parent 2867381 commit d7d4600
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/extended/util/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ func ExecuteCommand(command string) error {
exitCode := <-shell.exitCodeChannel
shell.excbuf.WriteString(exitCode)

if exitCode != "0" {
stderr := GetLastCommandOutput("stderr")
fmt.Println(stderr)
return errors.New(stderr)
}

return err
}

Expand Down

0 comments on commit d7d4600

Please sign in to comment.