Skip to content

Commit 7a42eeb

Browse files
committed
Use useCaseSensitiveFileNames instead
1 parent 064b19d commit 7a42eeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/sys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,8 @@ namespace ts {
11861186
let activeSession: import("inspector").Session | "stopping" | undefined;
11871187
let profilePath = "./profile.cpuprofile";
11881188

1189-
const realpathSync = process.platform !== "win32" ? _fs.realpathSync.native : _fs.realpathSync;
1189+
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
1190+
const realpathSync = useCaseSensitiveFileNames ? _fs.realpathSync : (_fs.realpathSync.native ?? _fs.realpathSync);
11901191

11911192
const Buffer: {
11921193
new (input: string, encoding?: string): any;
@@ -1198,7 +1199,6 @@ namespace ts {
11981199
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
11991200

12001201
const platform: string = _os.platform();
1201-
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
12021202
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
12031203
const getCurrentDirectory = memoize(() => process.cwd());
12041204
const { watchFile, watchDirectory } = createSystemWatchFunctions({

0 commit comments

Comments
 (0)