Repository: cordova-lib Updated Branches: refs/heads/master 74a343217 -> 14675051c
CB-9617 Fixes incorrect project state after adding/removing 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/14675051 Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/14675051 Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/14675051 Branch: refs/heads/master Commit: 14675051c400a6811a6c6171fbf92f3475244630 Parents: 74a3432 Author: Vladimir Kotikov <v-vlk...@microsoft.com> Authored: Mon Sep 7 16:36:35 2015 +0300 Committer: Vladimir Kotikov <v-vlk...@microsoft.com> Committed: Mon Sep 7 17:33:24 2015 +0300 ---------------------------------------------------------------------- cordova-lib/src/cordova/plugin.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/14675051/cordova-lib/src/cordova/plugin.js ---------------------------------------------------------------------- diff --git a/cordova-lib/src/cordova/plugin.js b/cordova-lib/src/cordova/plugin.js index f49205a..066bf07 100644 --- a/cordova-lib/src/cordova/plugin.js +++ b/cordova-lib/src/cordova/plugin.js @@ -31,7 +31,8 @@ var cordova_util = require('./util'), pluginMapper = require('cordova-registry-mapper').newToOld, events = require('../events'), metadata = require('../plugman/util/metadata'), - chainMap = require('../util/promise-util').Q_chainmap; + chainMap = require('../util/promise-util').Q_chainmap, + cordova = require('./cordova'); // Returns a promise. module.exports = function plugin(command, targets, opts) { @@ -204,6 +205,8 @@ module.exports = function plugin(command, targets, opts) { }); }, Q()); // end Q.all }).then(function() { + return cordova.raw.prepare(opts); + }).then(function() { opts.cordova = { plugins: cordova_util.findPlugins(pluginPath) }; return hooksRunner.fire('after_plugin_add', opts); }); @@ -255,6 +258,8 @@ module.exports = function plugin(command, targets, opts) { metadata.remove_fetch_metadata(pluginPath, target); }); }, Q()); + }).then(function () { + return cordova.raw.prepare(opts); }).then(function() { opts.cordova = { plugins: cordova_util.findPlugins(pluginPath) }; return hooksRunner.fire('after_plugin_rm', opts); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org