Skip to content

Commit 3dde906

Browse files
committed
Handle deleted files
1 parent 07f7815 commit 3dde906

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/IncrementalChecker.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,14 @@ IncrementalChecker.prototype.getLints = function (cancellationToken) {
150150
workSet.forEach(function (fileName) {
151151
cancellationToken.throwIfCancellationRequested();
152152

153-
this.linter.lint(fileName, undefined, this.linterConfig);
153+
try {
154+
this.linter.lint(fileName, undefined, this.linterConfig);
155+
} catch (e) {
156+
if (fs.existsSync(fileName)) {
157+
// it's not because file doesn't exist - throw error
158+
throw e;
159+
}
160+
}
154161
}.bind(this));
155162

156163
// set lints in files register

0 commit comments

Comments
 (0)