You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by al...@apache.org on 2017/08/18 05:52:24 UTC
[cordova-windows] branch master updated: CB-13155: Improved target
parsing
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 <al...@akvelon.com>
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
['"commits@cordova.apache.org" <co...@cordova.apache.org>'].
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org