You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2015/02/18 03:16:55 UTC

cordova-lib git commit: CB-8472 Can't find config.xml error installing browser platform after plugin. (close #167)

Repository: cordova-lib
Updated Branches:
  refs/heads/master d77ebc40a -> a506acd3d


CB-8472 Can't find config.xml error installing browser platform after plugin.  (close #167)

Recent changes to the process of adding a platform meant we were trying to trying to install plugins for the platform before we had called prepare() for the platform. Also, we were calling prepare() outside the loop that processes each platform, which meant the plaform local variable was not in scope, and we were passing a reference to a function called platform() to prepare() rather than a platform name.

Fixed this by moving the prepare() call back where it used to be - just before we install plugins.


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

Branch: refs/heads/master
Commit: a506acd3df34eed42336e5c627403004b0ff80f1
Parents: d77ebc4
Author: Tim Barham <ti...@microsoft.com>
Authored: Mon Feb 16 12:52:08 2015 +1000
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Feb 17 21:15:49 2015 -0500

----------------------------------------------------------------------
 cordova-lib/src/cordova/platform.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a506acd3/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index a1eee41..0ef7683 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -151,6 +151,8 @@ function addHelper(cmd, hooksRunner, projectRoot, targets, opts) {
                     return superspawn.spawn(bin, args, copts);
                 }).then(function() {
                     copy_cordova_js(projectRoot, platform);
+                }).then(function () {
+                    return require('./cordova').raw.prepare(platform);
                 }).then(function() {
                     if (cmd == 'add') {
                         return installPluginsForNewPlatform(platform, projectRoot, cfg, opts);
@@ -163,14 +165,12 @@ function addHelper(cmd, hooksRunner, projectRoot, targets, opts) {
                         cfg.removeEngine(platform);
                         cfg.addEngine(platform, version);
                         cfg.write();
-                    }                    
+                    }
                 });
             });
         });
     }).then(function() {
         return hooksRunner.fire('after_platform_' + cmd, opts);
-    }).then(function() {
-        return require('./cordova').raw.prepare(platform);
     });
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org