This is an automated email from the ASF dual-hosted git repository.

alsorokin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git


The following commit(s) were added to refs/heads/master by this push:
     new ab9837b  CB-13155: Improved target parsing
ab9837b is described below

commit ab9837ba05e0c8485070bf463fee635d3c212aae
Author: Alexander Sorokin <[email protected]>
AuthorDate: Tue Aug 15 13:53:19 2017 +0300

    CB-13155: Improved target parsing
---
 template/cordova/lib/package.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/template/cordova/lib/package.js b/template/cordova/lib/package.js
index 6269885..4c42263 100644
--- a/template/cordova/lib/package.js
+++ b/template/cordova/lib/package.js
@@ -147,7 +147,13 @@ module.exports.findDevice = function (deploymentTool, 
target) {
             return Q.resolve(deviceList[0]);
         } else {
             var candidateList = deviceList.filter(function (device) {
-                return device.index === parseInt(target, 10);
+                if (device.index === parseInt(target, 10)) {
+                    return true;
+                } else if 
(device.name.toLowerCase().indexOf(target.toLowerCase()) >= 0) {
+                    return true;
+                } else {
+                    return false;
+                }
             });
 
             if (candidateList.length > 0) {

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to