copy-and-watch
Advanced tools
Comparing version
@@ -71,4 +71,8 @@ const fs = require('fs'); | ||
const to = findTarget(from); | ||
fs.unlinkSync(to); | ||
console.log('[DELETE]'.yellow, to); | ||
if(fs.existsSync(to)) { | ||
fs.unlinkSync(to); | ||
console.log('[DELETE]'.yellow, to); | ||
}else{ | ||
console.log('[DELETE FAILED]'.yellow, to); | ||
} | ||
}; | ||
@@ -75,0 +79,0 @@ const rimraf = dir => { |
{ | ||
"name": "copy-and-watch", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Synchronize files or folders locally, with a watch option", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -45,2 +45,5 @@ # copy-and-watch | ||
##### 0.1.7 | ||
- Check file existence before removal (by mt3o) | ||
##### 0.1.4 | ||
@@ -47,0 +50,0 @@ - Added support for `—skip-initial-copy` argument (by mugli) |
6692
2.34%102
4.08%53
6%