Skip to content

Commit 22cd31a

Browse files
committed
Added output buffers in error messages (if used)
1 parent dc04dd3 commit 22cd31a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/feedback/feedback.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,15 @@ func Fatal(errorMsg string, exitCode int) {
189189
}
190190

191191
type FatalError struct {
192-
Error string `json:"error"`
192+
Error string `json:"error"`
193+
Output *OutputStreamsResult `json:"output,omitempty"`
193194
}
194195
res := FatalError{
195196
Error: errorMsg,
196197
}
198+
if output := getOutputStreamResult(); !output.Empty() {
199+
res.Output = output
200+
}
197201
var d []byte
198202
switch format {
199203
case JSON:

0 commit comments

Comments
 (0)