Github user bso-intel commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/396#discussion_r54328731
  
    --- Diff: cordova-lib/src/plugman/install.js ---
    @@ -79,21 +79,36 @@ module.exports = function installPlugin(platform, 
project_dir, id, plugins_dir,
         }
     
         var current_stack = new action_stack();
    -
         // Split @Version from the plugin id if it exists.
         var splitVersion = id.split('@');
         //Check if a mapping exists for the plugin id
         //if it does, convert id to new name id
    -    var newId = pluginMapper[splitVersion[0]];
    +    var newId = pluginMapper.oldToNew[splitVersion[0]];
         if(newId) {
    -        events.emit('warn', 'Notice: ' + id + ' has been automatically 
converted to ' + newId + ' and fetched from npm. This is due to our old plugins 
registry shutting down.');
             if(splitVersion[1]) {
                 id = newId +'@'+splitVersion[1];
             } else {
                 id = newId;
             }
    -     }
    -    return possiblyFetch(id, plugins_dir, options)
    +    }
    +    var P;
    +    var plugin_dir = path.join(plugins_dir, splitVersion[0]);
    +    // if the plugin has already been fetched, use it.
    +    if (fs.existsSync(plugin_dir)) {
    +        P = Q(plugin_dir);
    +    } else {
    +        var alias = pluginMapper.newToOld[splitVersion[0]] || newId;
    +        // if the plugin alias has already been fetched, use it.
    +        if (alias && fs.existsSync(path.join(plugins_dir, alias))) {
    +            P = Q(path.join(plugins_dir, alias));
    --- End diff --
    
    I actually added a warning message in the fetch.js file.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to