Previously if an error happened in the promise constructor in startSc (like the error that is rethrown as the result of a timeout) it would never be handled anywhere, causing node to exit with an error as a result of an unhandled promise rejection. The promise constructor does not really expect a function that returns a promise, and if it did that rejection would not be handled, as was the case here.
So this PR updates scartSc to not be wrapped in a new Promise.
It also increases the timeout as I saw 45 seconds was sometimes not enough.
Previously if an error happened in the promise constructor in
startSc
(like the error that is rethrown as the result of a timeout) it would never be handled anywhere, causing node to exit with an error as a result of an unhandled promise rejection. The promise constructor does not really expect a function that returns a promise, and if it did that rejection would not be handled, as was the case here.So this PR updates
scartSc
to not be wrapped in anew Promise
.It also increases the timeout as I saw 45 seconds was sometimes not enough.
fixes https://github.com/saucelabs/sauce-connect-action/issues/59