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

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

Github user daserge commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/308#discussion_r39896066
  
    --- Diff: cordova-lib/src/cordova/platform.js ---
    @@ -363,6 +363,7 @@ function remove(hooksRunner, projectRoot, targets, 
opts) {
                 platformMetadata.remove(projectRoot, target);
             });
         }).then(function() {
    +        opts.cordova.platforms = 
cordova_util.listPlatforms(opts.projectRoot);
    --- End diff --
    
    @vladimir-kotikov probably the root reason of the issue is in 
hooksRunner.opts.platforms [being set in 
platforms.js](https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/platform.js#L570)
 and then used in [refineOpts in 
HooksRunner](https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/hooks/HooksRunner.js#L69)
 - we will need to refine the way context.opts.cordova.platforms is used and 
properly document it.


> "after_platform_rm" event fires with wrong parameter
> ----------------------------------------------------
>
>                 Key: CB-9521
>                 URL: https://issues.apache.org/jira/browse/CB-9521
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 5.2.0
>         Environment: windows
>            Reporter: junshan liu
>            Priority: Critical
>
> I add a listener to listen to "after_platform_rm" event. when the event is 
> fired, the parameter passed into the listener function is not correct.
> The property "cordova.platforms" contains the platform I just removed. For 
> example, I removed "android" platform, but "cordova.platforms" still contains 
> "android".



--
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