Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/compiler/sys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ export let sys: System = (() => {
const statSyncOptions = { throwIfNoEntry: false } as const;

const platform: string = _os.platform();
const getCurrentDirectory = memoize(() => process.cwd());
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;

Expand All @@ -1498,7 +1499,6 @@ export let sys: System = (() => {
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;

const fsSupportsRecursiveFsWatch = process.platform === "win32" || isMacOs;
const getCurrentDirectory = memoize(() => process.cwd());
const { watchFile, watchDirectory } = createSystemWatchFunctions({
pollingWatchFileWorker: fsWatchFileWorker,
getModifiedTime,
Expand Down Expand Up @@ -1725,7 +1725,7 @@ export let sys: System = (() => {
return false;
}
// If this file exists under a different case, we must be case-insensitve.
return !fileExists(swapCase(__filename));
return !fileExists(swapCase(getCurrentDirectory()));
}

/** Convert all lowercase chars to uppercase, and vice-versa */
Expand Down