From 3f3e9b7555260d50210754fb055914a1d789613b Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Wed, 6 May 2020 22:01:04 +0100 Subject: [PATCH] fix(compiler-cli): ensure `getRootDirs()` handles case-sensitivity (#36859) Previously the `getRootDirs()` function was not converting the root directory paths to their canonical form, which can cause problems on case-insensitive file-systems. PR Close #36859 --- packages/compiler-cli/src/ngtsc/util/src/typescript.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/ngtsc/util/src/typescript.ts b/packages/compiler-cli/src/ngtsc/util/src/typescript.ts index dc38c2a96c..c4632994b9 100644 --- a/packages/compiler-cli/src/ngtsc/util/src/typescript.ts +++ b/packages/compiler-cli/src/ngtsc/util/src/typescript.ts @@ -105,7 +105,7 @@ export function getRootDirs(host: ts.CompilerHost, options: ts.CompilerOptions): // See: // https://github.com/Microsoft/TypeScript/blob/3f7357d37f66c842d70d835bc925ec2a873ecfec/src/compiler/sys.ts#L650 // Also compiler options might be set via an API which doesn't normalize paths - return rootDirs.map(rootDir => absoluteFrom(rootDir)); + return rootDirs.map(rootDir => absoluteFrom(host.getCanonicalFileName(rootDir))); } export function nodeDebugInfo(node: ts.Node): string {