refactor(console) WIN32 -> WIN

This commit is contained in:
coderaiser 2014-07-08 10:30:21 -04:00
parent 66ca7111a4
commit dfbb1ccd4f

View file

@ -25,7 +25,7 @@
ClientFuncs = [],
ClientDirs = [],
Clients = [],
WIN32 = process.platform === 'win32',
WIN = process.platform === 'win32',
addNewLine = CloudFunc.addNewLine,
@ -137,7 +137,7 @@
}
if (!ret) {
if (WIN32)
if (WIN)
command = 'cmd /C ' + command;
if (!ClientFuncs[connNum])
@ -160,7 +160,7 @@
Util.exec(callback, {
stdout: command
}, true);
} else if (WIN32 || firstChar === ' ' || isContain)
} else if (WIN || firstChar === ' ' || isContain)
exec(command, options, funcExec);
else
setSpawn(command, options, callback);
@ -276,7 +276,7 @@
isVolume = win.isVolume(command),
paramDir = Util.rmStr(command, 'cd '),
isRootOrHome = equalPart(paramDir, ['/', '~']),
getDir = WIN32 ? 'chdir' : 'pwd';
getDir = WIN ? 'chdir' : 'pwd';
if (!isRootOrHome && !isChangeVolume || isVolume)
command = 'cd ' + path.join(currDir, paramDir);