cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [65/68] [abbrv] cordova-lib git commit: CB-12705: Pass plugin info to project *_plugin_install hooks
Date Tue, 02 May 2017 00:09:25 GMT
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/1e2a4947
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/1e2a4947
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/1e2a4947

Branch: refs/heads/common-2.0.x
Commit: 1e2a49479b3f03b55e0e8f59361ec47415ac6d27
Parents: e0c3fee
Author: feichngr <fabian.eichinger@gmail.com>
Authored: Tue Apr 25 18:16:11 2017 +0200
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Tue May 2 02:07:33 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/1e2a4947/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


Mime
View raw message