cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevengill <...@git.apache.org>
Subject [GitHub] cordova-lib pull request #555: CB-12786: Improve logic for searching plugin ...
Date Sat, 03 Jun 2017 00:00:36 GMT
Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/555#discussion_r119971709
  
    --- Diff: cordova-fetch/index.js ---
    @@ -148,9 +148,15 @@ function trimID(target) {
             target = parts[1];
         }
     
    -    //If local path exists, set target to final directory
    +    // If local path exists, try to get plugin id from package.json or set target to
final directory
         if (fs.existsSync(target)) {
    -        target = path.basename(target);
    +        var pluginId, pkgJsonPath = path.join(target, 'package.json');
    +
    +        if (fs.existsSync(pkgJsonPath)) {
    +            pluginId = JSON.parse(fs.readFileSync(pkgJsonPath)).cordova.id;
    --- End diff --
    
    I think it was due to packageJson.name potentially being different then plugin.xml id
field. But I don't know of any plugins with this and I'm not sure it makes sense to have that
distinction anymore. 


---
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