diff --git a/lib/steal-cordova.js b/lib/steal-cordova.js index 154edee..e3c9261 100644 --- a/lib/steal-cordova.js +++ b/lib/steal-cordova.js @@ -66,7 +66,13 @@ StealCordova.prototype = { return glob(files).then(function(files){ var copies = files.map(function(file){ - return copy(file, destPath(file)); + return copy(file, destPath(file)) + .catch(function(error) { + console.error('First attempt at copying', file, + 'failed because of', error, 'Trying again...'); + + return copy(file, destPath(file)); + }); }); // copy the index.html file copies.push(stealCordova.copyIndexHTML(dest));