Permalink
Browse files

Merge pull request #115 from jenius/sjs/fix-chrome-save-unlink-error

handle error unlinking file in watch
  • Loading branch information...
2 parents 8baeaee + 3932f97 commit 5509dfc519f06e745a2baf6a88186eed1ca450a8 Jeff Escalante committed Mar 4, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/commands/watch.js
@@ -55,7 +55,12 @@ var _watch = function(){
if (fs.existsSync(file.fullPath)){
roots.compile_project(file.fullPath, server.reload);
} else {
- fs.unlinkSync(output_path(file.fullPath));
+ try {
+ fs.unlinkSync(output_path(file.fullPath));
+ } catch(e) {
+ console.log("Error Unlinking File".inverse.red);
+ console.log(e);
+ }
server.reload();
}
}

0 comments on commit 5509dfc

Please sign in to comment.