Skip to content

Commit 1137f4b

Browse files
author
Joshua Causey
authored
Adding additional checks for error type
1 parent afd855f commit 1137f4b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/IncrementalChecker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ class IncrementalChecker {
240240
} catch (e) {
241241
if (
242242
fs.existsSync(fileName) &&
243-
!e.message.trim().startsWith("Invalid source file")
243+
// check the error type due to file system lag
244+
!(e instanceof Error) &&
245+
!(e.constructor.name === 'FatalError') &&
246+
!(e.message && e.message.trim().startsWith('Invalid source file')
244247
) {
245248
// it's not because file doesn't exist - throw error
246249
throw e;

0 commit comments

Comments
 (0)