Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CB-7616 Deploy on WP8 fails to run specific target
  • Loading branch information
sgrebnov committed Sep 23, 2014
1 parent a745b12 commit 271de27b5415867382ee292b1c8e6c62563fff64
Showing 2 changed files with 4 additions and 2 deletions.
@@ -26,10 +26,11 @@ var Q = require('q'),
// returns one of available devices which name match with parovided string
// return rejected promise if device with name specified not found
module.exports.findDevice = function (target) {
target = target.toLowerCase();
return module.exports.listDevices()
.then(function(deviceList) {
for (var idx in deviceList){
if (deviceList[idx].indexOf(target) > -1) {
if (deviceList[idx].toLowerCase() == target) {
return Q.resolve(idx);
}
}
@@ -21,6 +21,7 @@ var Q = require('q'),
fs = require('fs'),
path = require('path'),
shell = require('shelljs'),
device = require ('./device'),
utils = require('./utils');

function Package (packagepath) {
@@ -32,7 +33,7 @@ Package.prototype.deployTo = function (deployTarget) {
return utils.getXapDeploy()
.then(function (xapDeploy) {
var getTarget = deployTarget == "device" ? Q("de") :
deployTarget == "emulator" ? Q("xd") : module.exports.findDevice(deployTarget);
deployTarget == "emulator" ? Q("xd") : device.findDevice(deployTarget);

return getTarget.then(function (target) {
return utils.spawn(xapDeploy, ['/installlaunch', pkg.packagePath, '/targetdevice:' + target]);

0 comments on commit 271de27

Please sign in to comment.