[
https://issues.apache.org/jira/browse/CB-12705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985740#comment-15985740
]
ASF GitHub Bot commented on CB-12705:
-------------------------------------
Github user stevengill commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/549#discussion_r113586243
--- Diff: 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;
--- End diff --
Am I correct in understanding that this is already being passed in? You
just add a if statement to confirm it exists before assigning?
@feichngr
> Project *_plugin_install hooks don't have information on installed plugin
> -------------------------------------------------------------------------
>
> Key: CB-12705
> URL: https://issues.apache.org/jira/browse/CB-12705
> Project: Apache Cordova
> Issue Type: Improvement
> Components: cordova-cli, CordovaLib
> Affects Versions: 6.5.0
> Reporter: Fabian Eichinger
>
> I want to build a {{after_plugin_install}} javascript hook for my project
> that only executes it logic when installing a specific plugin (in my case
> {{cordova-plugin-file}}). As it turns out the context passed to project-level
> {{\*_plugin_install}} hooks do not contain *any* information on the plugin
> that was installed and this makes these kind of hooks basically useless.
> I propose passing to them the same information in {{context.opts.plugin}} as
> to plugin hooks.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]