Skip to content

Commit

Permalink
only fail if we receive ENOENT
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Oct 8, 2020
1 parent 7ab378b commit ed4a1f9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/local-tunnel/sauceconnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ export function SauceConnect(emitter, logger) {
/**
* fail starting Sauce Connect eventually
*/
if (scStartTrials >= MAX_SC_START_TRIALS) {
if (
/**
* only fail for ENOENT errors due to racing condition
* see: https://github.com/saucelabs/node-saucelabs/issues/86
*/
!err.message.includes('ENOENT') ||
/**
* or if we reached the maximum rety count
*/
scStartTrials >= MAX_SC_START_TRIALS
) {
throw err
}

Expand Down

0 comments on commit ed4a1f9

Please sign in to comment.