CI: Fix Sauce screenshot exit conditions Firstly, always quit the Sauce browser instance even if an error was thrown. Secondly, if no error was thrown, tell Sauce the job status passed.
diff --git a/script/screenshots.js b/script/screenshots.js index 6db65b9..475895c 100644 --- a/script/screenshots.js +++ b/script/screenshots.js
@@ -189,11 +189,12 @@ }); }); }) - .quit() + .sauceJobStatus(true) .fail(function(err) { console.log('ERROR:', browser.config.browserName, browser.config.platform); console.log(JSON.stringify(err, null, 2)); - }); + }) + .quit(); function willLog() { var msg = [].join.call(arguments, ' ');