fix the timeout not honor bug

This commit is contained in:
yimysty
2022-03-28 12:32:59 -07:00
parent 6afc4f2884
commit 12940a5b99
5 changed files with 23 additions and 20 deletions

View File

@@ -138,12 +138,13 @@ class Deployment {
core.setFailed('Failed with status code: ' + res.status)
break
}
}
// Handle timeout
if (Date.now() - startTime >= timeout) {
core.info('Timeout reached, aborting!')
core.setFailed('Timeout reached, aborting!')
return
// Handle timeout
if (Date.now() - startTime >= timeout) {
core.info('Timeout reached, aborting!')
core.setFailed('Timeout reached, aborting!')
return
}
}
} catch (error) {
core.setFailed(error)