Skip to content

Commit

Permalink
Use useCaseSensitiveFileNames instead
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Mar 23, 2021
1 parent 064b19d commit 7a42eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/sys.ts
Expand Up @@ -1186,7 +1186,8 @@ namespace ts {
let activeSession: import("inspector").Session | "stopping" | undefined;
let profilePath = "./profile.cpuprofile";

const realpathSync = process.platform !== "win32" ? _fs.realpathSync.native : _fs.realpathSync;
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
const realpathSync = useCaseSensitiveFileNames ? _fs.realpathSync : (_fs.realpathSync.native ?? _fs.realpathSync);

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

const platform: string = _os.platform();
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
const getCurrentDirectory = memoize(() => process.cwd());
const { watchFile, watchDirectory } = createSystemWatchFunctions({
Expand Down

0 comments on commit 7a42eeb

Please sign in to comment.