Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit c517d4a

Browse files
committed
added check for error in readConfigFile result
1 parent a4f03c0 commit c517d4a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/instance.ts

+7
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,13 @@ export function readConfigFile(
345345
}
346346

347347
let jsonConfigFile = tsImpl.readConfigFile(configFilePath, tsImpl.sys.readFile)
348+
if (jsonConfigFile.error) {
349+
console.error('Error occurred while reading tsconfig file', configFilePath, jsonConfigFile)
350+
throw new Error(
351+
_.get(jsonConfigFile, 'error.messageText.messageText') ||
352+
_.get(jsonConfigFile, 'error.messageText')
353+
)
354+
}
348355
let compilerConfig = tsImpl.parseJsonConfigFileContent(
349356
jsonConfigFile.config,
350357
tsImpl.sys,

0 commit comments

Comments
 (0)