Fix undefined exit code

This commit is contained in:
jamesread 2021-07-19 08:04:39 +01:00
parent 1df36ae196
commit ff0b29c87c
1 changed files with 3 additions and 3 deletions

View File

@ -44,10 +44,10 @@ class ActionButton extends window.HTMLButtonElement {
).then((json) => {
marshalLogsJsonToHtml({"logs": [json.logEntry]})
if (json.timedOut) {
if (json.logEntry.timedOut) {
this.onActionResult('actionTimeout', 'Timed out')
} else if (json.exitCode !== 0) {
this.onActionResult('actionNonZeroExit', 'Exit code ' + json.exitCode)
} else if (json.logEntry.exitCode !== 0) {
this.onActionResult('actionNonZeroExit', 'Exit code ' + json.logEntry.exitCode)
} else {
this.onActionResult('actionSuccess', 'Success!')
}