Github user robpaveza commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/228#discussion_r36766569
  
    --- Diff: cordova-lib/src/plugman/fetch.js ---
    @@ -146,11 +145,7 @@ function fetchPlugin(plugin_src, plugins_dir, options) 
{
             });
         }).then(function(result){
             checkID(options.expected_id, result.pinfo);
    -        var data = { source: result.fetchJsonSource };
    -        data.is_top_level = options.is_top_level; 
    -        data.variables = options.variables || {};
    -        metadata.save_fetch_metadata(plugins_dir, result.pinfo.id, data);
    -        return result.dest;
    +        return result;
    --- End diff --
    
    Function name `checkID` seems to do something and return a result, but you 
don't capture that result, nor do you return anything with that result.  
Because you pass the value of `result.pinfo` by value, `checkID` has no 
opportunity to mutate or modify anything.
    
    What happens if `checkID` "fails", if it can?  If it can't, why is it 
called `check`?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to