From 654868f5840597b16adf9ff7f71d0e9f32f04946 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 7 May 2020 08:29:24 +0100 Subject: [PATCH] fix(compiler-cli): normalize mock Windows file paths correctly (#36968) Since the `MockFileSystemWindows` is case-insensitive, any drive path that must be added to a normalized path should be lower case to make the path canonical. PR Close #36968 --- .../ngtsc/file_system/testing/src/mock_file_system_windows.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts b/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts index 9cabd0a2b9..e733197d3b 100644 --- a/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts +++ b/packages/compiler-cli/src/ngtsc/file_system/testing/src/mock_file_system_windows.ts @@ -42,6 +42,6 @@ export class MockFileSystemWindows extends MockFileSystem { } normalize(path: T): T { - return path.replace(/^[\/\\]/i, 'C:/').replace(/\\/g, '/') as T; + return path.replace(/^[\/\\]/i, 'c:/').replace(/\\/g, '/') as T; } }