cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robpaveza <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-8627: Only update fetch.json when plu...
Date Tue, 11 Aug 2015 16:34:52 GMT
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 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