cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agrieve <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-8420 'cordova plugin add' should retr...
Date Wed, 11 Feb 2015 15:02:25 GMT
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/162#discussion_r24500705
  
    --- Diff: cordova-lib/src/cordova/plugin.js ---
    @@ -114,6 +116,22 @@ module.exports = function plugin(command, targets, opts) {
                                 target = target.substring(0, target.length - 1);
                             }
     
    +                        var parts = target.split('@');
    +                        var id = parts[0];
    +                        var version = parts[1];
    +
    +                        // If no version is specified, retrieve the version from config.xml
    +                        if(!version && !cordova_util.isUrl(id) && !cordova_util.isDirectory(id)){
    +                            events.emit('verbose', 'no version specified, retrieving
version from config.xml');
    +                            var ver = getVersionFromConfigFile(id, cfg);
    +
    +                            if( cordova_util.isUrl(ver) || cordova_util.isDirectory(ver)
){
    --- End diff --
    
    isDirectory don't check for null/undefined. Should either add that to isDirectory, or
add check here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message