Move execRetry() from shared.js to uhk.js

This commit is contained in:
László Monda
2018-01-30 21:37:27 +01:00
parent 288d4f75b6
commit 0d9c976eb8
3 changed files with 18 additions and 18 deletions

View File

@@ -1,22 +1,6 @@
require('shelljs/global');
function execRetry(command) {
let firstRun = true;
let remainingRetries = 3;
let code;
do {
if (!firstRun) {
console.log(`Retrying ${command}`)
}
config.fatal = !remainingRetries;
code = exec(command).code;
config.fatal = true;
firstRun = false;
} while(code && --remainingRetries);
}
const exp = {
execRetry,
}
Object.keys(exp).forEach(function (cmd) {