Skip to content

Commit

Permalink
Merge pull request #115 from jenius/sjs/fix-chrome-save-unlink-error
Browse files Browse the repository at this point in the history
handle error unlinking file in watch
  • Loading branch information
Jeff Escalante committed Mar 4, 2013
2 parents 8baeaee + 3932f97 commit 5509dfc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/commands/watch.js
Expand Up @@ -55,7 +55,12 @@ var _watch = function(){
if (fs.existsSync(file.fullPath)){ if (fs.existsSync(file.fullPath)){
roots.compile_project(file.fullPath, server.reload); roots.compile_project(file.fullPath, server.reload);
} else { } 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(); server.reload();
} }
} }
Expand Down

0 comments on commit 5509dfc

Please sign in to comment.