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
This commit is contained in:
Pete Bacon Darwin 2020-05-06 22:01:04 +01:00 committed by Alex Rickabaugh
parent 53a8459d5f
commit 3f3e9b7555
1 changed files with 1 additions and 1 deletions

View File

@ -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 {