You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2017/05/01 21:48:16 UTC
[2/2] cordova-lib git commit: CB-12705: Pass plugin info to project
*_plugin_install hooks
CB-12705: Pass plugin info to project *_plugin_install hooks
Before running runScriptViaModuleLoader context.opts.plugin already contains information on the plugin. Modified the function so that the field is only overridden if the script comes from a plugin.
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/f038ca44
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/f038ca44
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/f038ca44
Branch: refs/heads/master
Commit: f038ca44f4d7c6b08271e3d3dad66256ddb3377f
Parents: 677d252
Author: feichngr <fa...@gmail.com>
Authored: Tue Apr 25 18:16:11 2017 +0200
Committer: Steve Gill <st...@gmail.com>
Committed: Mon May 1 23:47:31 2017 +0200
----------------------------------------------------------------------
cordova-lib/src/hooks/HooksRunner.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f038ca44/cordova-lib/src/hooks/HooksRunner.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/hooks/HooksRunner.js b/cordova-lib/src/hooks/HooksRunner.js
index bd86046..7206ffd 100644
--- a/cordova-lib/src/hooks/HooksRunner.js
+++ b/cordova-lib/src/hooks/HooksRunner.js
@@ -178,7 +178,9 @@ function runScriptViaModuleLoader(script, context) {
}
var scriptFn = require(script.fullPath);
context.scriptLocation = script.fullPath;
- context.opts.plugin = script.plugin;
+ if(script.plugin) {
+ context.opts.plugin = script.plugin;
+ }
// We can't run script if it is a plain Node script - it will run its commands when we require it.
// This is not a desired case as we want to pass context, but added for compatibility.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org