[ 
https://issues.apache.org/jira/browse/CB-10654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15154937#comment-15154937
 ] 

ASF GitHub Bot commented on CB-10654:
-------------------------------------

GitHub user tony-- opened a pull request:

    https://github.com/apache/cordova-lib/pull/395

    CB-10654 make hooks fire when platforms added from repo or dir

    move `hooksRunner.fire('before_platform_'...) ` till after platform has 
been resolved, pass resolved platform instead of target.
    move `hooksRunner.fire('after_platform_'...) ` into platform loop, pass 
resolved platform instead of target.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tony--/cordova-lib CB-10654

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/395.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #395
    
----
commit 045ab1ace5666a7d06752d9691e3e8298ec032bd
Author: Tony Homer <[email protected]>
Date:   2016-02-19T21:43:09Z

    CB-10654 make hooks fire when platforms added from repo or dir

----


> _platform_add hooks not executed when platform added from repo or directory
> ---------------------------------------------------------------------------
>
>                 Key: CB-10654
>                 URL: https://issues.apache.org/jira/browse/CB-10654
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: Master
>            Reporter: Tony Homer
>
> before_platform_add and after_platform_add hooks are not executed when 
> platforms are added from directory or repo.  This is because the matching 
> logic in platform.js depends on the targets specified in command line 
> arguments.
> It seems that the matching logic should be deferred until the platform can be 
> determined via getPlatformDetailsFromDir.
> This would require that the before_platform_add hook not be executed until 
> after the platform has been downloaded.
> Steps to reproduce
> # create a project with hooks for before_platform_add and/or 
> after_platform_add
> # add platform from repo or local dir, e.g.
> {code}
> cordova platform add https://github.com/apache/cordova-android
> cordova platform add my-local-copy-of-cordova-android
> {code}
> # hooks do not get executed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to