Fix undefined exit code
This commit is contained in:
parent
1df36ae196
commit
ff0b29c87c
|
|
@ -44,10 +44,10 @@ class ActionButton extends window.HTMLButtonElement {
|
||||||
).then((json) => {
|
).then((json) => {
|
||||||
marshalLogsJsonToHtml({"logs": [json.logEntry]})
|
marshalLogsJsonToHtml({"logs": [json.logEntry]})
|
||||||
|
|
||||||
if (json.timedOut) {
|
if (json.logEntry.timedOut) {
|
||||||
this.onActionResult('actionTimeout', 'Timed out')
|
this.onActionResult('actionTimeout', 'Timed out')
|
||||||
} else if (json.exitCode !== 0) {
|
} else if (json.logEntry.exitCode !== 0) {
|
||||||
this.onActionResult('actionNonZeroExit', 'Exit code ' + json.exitCode)
|
this.onActionResult('actionNonZeroExit', 'Exit code ' + json.logEntry.exitCode)
|
||||||
} else {
|
} else {
|
||||||
this.onActionResult('actionSuccess', 'Success!')
|
this.onActionResult('actionSuccess', 'Success!')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue