Skip to content

Commit f0b25b6

Browse files
committed
fix(nginx): handle nil stdErr in GetOutput method #1056
1 parent 91c0743 commit f0b25b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/nginx/control.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ func (t *ControlResult) RespError(c *gin.Context) {
5050
}
5151

5252
func (t *ControlResult) GetOutput() string {
53+
if t.stdErr == nil {
54+
return t.stdOut
55+
}
5356
return strings.Join([]string{t.stdOut, t.stdErr.Error()}, " ")
5457
}
5558

0 commit comments

Comments
 (0)