Permalink
Browse files

Fix a bug with JSHint CLI crashing when file is not found

  • Loading branch information...
1 parent 815dae1 commit bc538da87145da75497fcdc3678795f72e401612 @valueof valueof committed Jan 2, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/cli/cli.js
View
@@ -219,6 +219,11 @@ function collect(fp, files, ignores, ext) {
return;
}
+ if (!shjs.test("-e", fp)) {
+ cli.error("Can't open " + fp);
+ return;
+ }
+
if (shjs.test("-d", fp)) {
shjs.ls(fp).forEach(function (item) {
var itempath = path.join(fp, item);

0 comments on commit bc538da

Please sign in to comment.