File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -311,9 +311,19 @@ namespace ts {
311
311
return parseInt ( process . version . charAt ( 1 ) ) >= 4 ;
312
312
}
313
313
314
+ function isFileSystemCaseSensitive ( ) : boolean {
315
+ // win32\win64 are case insensitive platforms
316
+ if ( platform === "win32" || platform === "win64" ) {
317
+ return false ;
318
+ }
319
+
320
+ const upperCaseFilename = _path . basename ( __filename ) . toUpperCase ( ) ;
321
+
322
+ return ! fileExists ( _path . join ( _path . dirname ( __filename ) , upperCaseFilename ) ) ;
323
+ }
324
+
314
325
const platform : string = _os . platform ( ) ;
315
- // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive
316
- const useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin" ;
326
+ const useCaseSensitiveFileNames = isFileSystemCaseSensitive ( ) ;
317
327
318
328
function readFile ( fileName : string , encoding ?: string ) : string {
319
329
if ( ! fileExists ( fileName ) ) {
You can’t perform that action at this time.
0 commit comments