Fix issue - failed to pass multi params in avdArgs

when passing multiple params in avdArgs, for instance, --avd-args="-port 5564", transfer the value string into array to avoid failures when spawning a new process
This commit is contained in:
Fan Bai
2014-05-06 15:51:28 +08:00
parent ca96b5c498
commit 487d9fb692

View File

@@ -756,7 +756,8 @@ ADB.prototype.launchAVD = function (avdName, avdArgs, avdLaunchTimeout,
if (avdArgs === null) {
avdArgs = [avdName];
} else if (typeof avdArgs === "string") {
avdArgs = [avdName, avdArgs];
avdArgs = avdArgs.split(" ");
avdArgs.unshift(avdName);
}
var proc = spawn(emulatorBinaryPath.substr(1, emulatorBinaryPath.length - 2),
avdArgs);