You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/07/17 20:37:07 UTC
[jira] [Commented] (CB-7124) `cordova platform add
@` not working for Git based installs
[ https://issues.apache.org/jira/browse/CB-7124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14065325#comment-14065325 ]
ASF GitHub Bot commented on CB-7124:
------------------------------------
GitHub user pascalw opened a pull request:
https://github.com/apache/cordova-lib/pull/61
CB-7124: Fix `cordova platform add <platform>@version` with `--usegit`
https://issues.apache.org/jira/browse/CB-7124
The `cordova_git` function didn't consider that platform strings can contain `@version` annotations. I refactored the code a bit to keep the `@version` check in a single place, namely in the `Platform` object.
Please let me know if this patch is acceptable in this form.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pascalw/cordova-lib CB-7124
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-lib/pull/61.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #61
----
commit 3ae36ea2011d092769ca72db6b1e258f69a647a5
Author: Pascal Widdershoven <pa...@kabisa.nl>
Date: 2014-07-12T14:32:47Z
Wrap the cordova platform string in Platform object with name & version
This prevents having to duplicate the check wether or not the platform
string specifies a version or not.
----
> `cordova platform add <platform>@<version>` not working for Git based installs
> ------------------------------------------------------------------------------
>
> Key: CB-7124
> URL: https://issues.apache.org/jira/browse/CB-7124
> Project: Apache Cordova
> Issue Type: Bug
> Components: CLI
> Affects Versions: 3.5.0
> Reporter: Pascal Widdershoven
>
> Currently the {{cordova platform add <platform>@<version>}} is only working with the {{--usenpm}} option enabled.
> I think --usenpm is disabled by default (\?) so this feature will appear broken to most users. I've pinpointed the problem to [this peace of code|https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/lazy_load.js#L86] where for the cordova_git function the @version check is missing, resulting in a "Platform not recognized" error when the platform includes a version code.
> I hope I can find some time to sign the ICLA and send a pull request. In general it seems that the whole @version check could be handled more elegantly, right now it's duplicated in several places making it easy to forget to add it somewhere.
--
This message was sent by Atlassian JIRA
(v6.2#6252)