mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
refactor(console) WIN32 -> WIN
This commit is contained in:
parent
66ca7111a4
commit
dfbb1ccd4f
1 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue