Skip to content

Commit

Permalink
Workaround async copy bug in fs-extra until possible fix (jprichard…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfredo-Delgado committed Jun 12, 2017
1 parent 3ab8929 commit 3f39ed5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/steal-cordova.js
Expand Up @@ -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));
Expand Down

0 comments on commit 3f39ed5

Please sign in to comment.