derive value of 'useCaseSensitiveFileNames' from underlying platform for node base implementation of 'sys'

This commit is contained in:
Vladimir Matveev 2014-07-14 11:16:21 -07:00
Родитель bbd14c005d
Коммит 3646788571
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -130,6 +130,10 @@ var sys: System = (function () {
var _path = require("path");
var _os = require('os');
var platform: string = _os.platform();
// win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive
var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin";
function readFile(fileName: string): string {
if (_fs.existsSync(fileName)) {
try {
@ -171,7 +175,7 @@ var sys: System = (function () {
return {
args: process.argv.slice(2),
newLine: _os.EOL,
useCaseSensitiveFileNames: true,
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
write(s: string): void {
process.stdout.write(s);
},