From 510330554fa7ec57a2aab929984f37ecfd517272 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 8 Jul 2014 10:36:29 -0400 Subject: [PATCH] feature(console) add ability to use CD on windows --- lib/server/console.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/server/console.js b/lib/server/console.js index 2e29ae14..93320fa0 100644 --- a/lib/server/console.js +++ b/lib/server/console.js @@ -105,6 +105,8 @@ connName, ret, isContain, isVolume = win.isChangeVolume(command), + isCD = command.match(new RegExp('^cd ')), + isCDWin = command.match(new RegExp('^cd ', 'i')), symbolsExec = ['*', '&', '{', '}', '|', '\'', '"'], CWD = process.cwd(), @@ -121,7 +123,7 @@ if (equalPart(command, CLOUDCMD)) ret = onCloudCmd(command, callback); - else if (equalPart(command, 'cd ') || isVolume) { + else if (isCD || isCDWin && WIN || isVolume) { ret = true; onCD(command, dir, function(error, json) {