Skip to content

Commit

Permalink
Handle deleted files
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-oles committed May 21, 2017
1 parent 07f7815 commit 3dde906
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/IncrementalChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@ IncrementalChecker.prototype.getLints = function (cancellationToken) {
workSet.forEach(function (fileName) {
cancellationToken.throwIfCancellationRequested();

this.linter.lint(fileName, undefined, this.linterConfig);
try {
this.linter.lint(fileName, undefined, this.linterConfig);
} catch (e) {
if (fs.existsSync(fileName)) {
// it's not because file doesn't exist - throw error
throw e;
}
}
}.bind(this));

// set lints in files register
Expand Down

0 comments on commit 3dde906

Please sign in to comment.