cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From feichngr <>
Subject [GitHub] cordova-lib pull request #549: CB-12705: Pass plugin info to project-level p...
Date Thu, 27 Apr 2017 05:06:43 GMT
Github user feichngr commented on a diff in the pull request:
    --- 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 --
    Yes and no. cordova-lib/src/plugman/install.js already populates `opts.plugin` before
it is passed to `HooksRunner`.
    What currently happens in this code snippet is that the field is overridden with either
information on the plugin which provides the script (i.e. the on in which `plugin.xml` it
is defined) or `undefined` if the script is part of the project (i.e. defined in config.xml)
because `script.plugin` is `undefined`.
    My change just prevents the override in the later case. The first case should behave as
before so it doesn't break existing scripts.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message