Skip to content

Commit 3f3e9b7

Browse files
petebacondarwinalxhub
authored andcommitted
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
1 parent 53a8459 commit 3f3e9b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/compiler-cli/src/ngtsc/util/src/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export function getRootDirs(host: ts.CompilerHost, options: ts.CompilerOptions):
105105
// See:
106106
// https://github.com/Microsoft/TypeScript/blob/3f7357d37f66c842d70d835bc925ec2a873ecfec/src/compiler/sys.ts#L650
107107
// Also compiler options might be set via an API which doesn't normalize paths
108-
return rootDirs.map(rootDir => absoluteFrom(rootDir));
108+
return rootDirs.map(rootDir => absoluteFrom(host.getCanonicalFileName(rootDir)));
109109
}
110110

111111
export function nodeDebugInfo(node: ts.Node): string {

0 commit comments

Comments
 (0)