cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject git commit: cd into the cloned git repo before running git checkout.
Date Wed, 22 May 2013 20:05:21 GMT
Updated Branches:
  refs/heads/git_refs a79a75e1f -> daec2d4d8


cd into the cloned git repo before running git checkout.


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

Branch: refs/heads/git_refs
Commit: daec2d4d817653e6ee4a1c8c6b711f4e12e925e8
Parents: a79a75e
Author: Fil Maj <maj.fil@gmail.com>
Authored: Wed May 22 13:05:16 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Wed May 22 13:05:16 2013 -0700

----------------------------------------------------------------------
 src/install.js      |    1 +
 src/util/plugins.js |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/daec2d4d/src/install.js
----------------------------------------------------------------------
diff --git a/src/install.js b/src/install.js
index 89bd034..6f70c4c 100644
--- a/src/install.js
+++ b/src/install.js
@@ -119,6 +119,7 @@ function runInstall(actions, platform, project_dir, plugin_dir, plugins_dir,
cli
 }
 
 function handleInstall(actions, plugin_id, plugin_et, platform, project_dir, plugins_dir,
plugin_basename, plugin_dir, filtered_variables, www_dir, is_top_level, callback) {
+    console.log('Installing plugin ' + plugin_id + '...');
     var handler = platform_modules[platform];
     www_dir = www_dir || handler.www_dir(project_dir);
 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/daec2d4d/src/util/plugins.js
----------------------------------------------------------------------
diff --git a/src/util/plugins.js b/src/util/plugins.js
index f8b2846..4f532d4 100644
--- a/src/util/plugins.js
+++ b/src/util/plugins.js
@@ -46,11 +46,13 @@ module.exports = {
                 if (callback) callback(err)
                 else throw err;
             } else {
+                console.log('Plugin "' + plugin_git_url + '" fetched.');
                 // Check out the specified revision, if provided.
                 if (git_ref) {
-                    var result = shell.exec(util.format('git checkout "%s"', git_ref), {
silent: true });
+                    var cmd = util.format('cd "%s" && git checkout "%s"', tmp_dir,
git_ref);
+                    var result = shell.exec(cmd, { silent: true, async:false });
                     if (result.code > 0) {
-                        var err = new Error('failed to checkout git ref "' + git_ref + '"
for plugin at git url "' + plugin_git_url + '"');
+                        var err = new Error('failed to checkout git ref "' + git_ref + '"
for plugin at git url "' + plugin_git_url + '", output: ' + result.output);
                         if (callback) callback(err);
                         else throw err;
                     }


Mime
View raw message