cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [42/50] git commit: fixing fetch
Date Sun, 28 Jul 2013 00:56:04 GMT
fixing fetch


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/1641fe84
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/1641fe84
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/1641fe84

Branch: refs/heads/master
Commit: 1641fe84133e8e9b0ee3fd9f7fff8ffb776b7642
Parents: 9dab680
Author: Anis Kadri <anis@apache.org>
Authored: Fri Jul 19 14:27:24 2013 -0700
Committer: Anis Kadri <anis@apache.org>
Committed: Fri Jul 19 14:27:24 2013 -0700

----------------------------------------------------------------------
 src/fetch.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/1641fe84/src/fetch.js
----------------------------------------------------------------------
diff --git a/src/fetch.js b/src/fetch.js
index 7cd4fb2..d5e3e8c 100644
--- a/src/fetch.js
+++ b/src/fetch.js
@@ -82,8 +82,13 @@ module.exports = function fetchPlugin(plugin_dir, plugins_dir, options,
callback
         if(!fs.existsSync(plugin_dir)) {
           registry.use(require('../plugman').config.registry, function() {
             registry.fetch([plugin_dir], function(err, plugin_dir) {
-                if (callback) return callback(err);
-                else throw err;
+                if (err) {
+                    if(callback) {
+                        return callback(err);
+                    } else {
+                         throw err;
+                    }
+                }
                 movePlugin(plugin_dir, false);
             });
           })


Mime
View raw message