Skip to content

Commit d12ae0f

Browse files
Orta Theroxamcasey
Orta Therox
authored andcommitted
Don't use _fs.realpathSync.native on windows, a semi-revert of microsoft#41292 (microsoft#43348)
We're planning a real fix for TS 4.3, but port the workaround from 4.2 so the beta doesn't have this bug. (cherry picked from commit e462dfa)
1 parent 3db6d80 commit d12ae0f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/sys.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,6 @@ namespace ts {
12651265
let activeSession: import("inspector").Session | "stopping" | undefined;
12661266
let profilePath = "./profile.cpuprofile";
12671267

1268-
const realpathSync = _fs.realpathSync.native ?? _fs.realpathSync;
12691268

12701269
const Buffer: {
12711270
new (input: string, encoding?: string): any;
@@ -1278,6 +1277,8 @@ namespace ts {
12781277

12791278
const platform: string = _os.platform();
12801279
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
1280+
const realpathSync = useCaseSensitiveFileNames ? _fs.realpathSync : (_fs.realpathSync.native ?? _fs.realpathSync);
1281+
12811282
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
12821283
const getCurrentDirectory = memoize(() => process.cwd());
12831284
const { watchFile, watchDirectory } = createSystemWatchFunctions({

0 commit comments

Comments
 (0)