GitHub user TimBarham opened a pull request:

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

    CB-9051 Plugins don't get re-added if platforms folder deleted.

    To avoid attempting to add a plugin twice while adding a platform (a 
scenario that can occur now with automatic restore of plugins and platforms), 
when adding plugins to a newly added platform we check to see if the plugin has 
already been added, by calling plugman's `PlatformJson.isPluginInstalled()`, 
which looks in `plugins/<platform>.json` to see if the plugin has been 
installed for a platform.
    
    If you delete a platform's folder from the platforms folder, it's 
`plugins/<platform>.json` file still exists, so if you add the platform again, 
we think all plugins are already installed for it and don't try to install them.
    
    Simple fix is to delete the platform's `plugins/<platform>.json` file 
before adding a platform, so we start with a clean slate.

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

    $ git pull https://github.com/MSOpenTech/cordova-lib CB-9051

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

    https://github.com/apache/cordova-lib/pull/223.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 #223
    
----
commit 4fe6df1ebef2346a3fccc1de7c3b05cf849f47f0
Author: Tim Barham <tim.bar...@microsoft.com>
Date:   2015-05-20T22:41:13Z

    CB-9051 Plugins don't get re-added if platforms folder deleted.
    
    To avoid attempting to add a plugin twice while adding a platform (a 
scenario that can occur now with automatic restore of plugins and platforms), 
when adding plugins to a newly added platform we check to see if the plugin has 
already been added by calling plugman's PlatformJson.isPluginInstalled(), which 
looks in plugins/<platform>.json to see if the plugin has been installed for a 
platform.
    
    If you delete a platform's folder, it's plugins/<platform>.json file still 
exists, so if you add the platform again, we think all plugins are already 
installed for it and so don't try to install them.
    
    Simple fix is to delete the platform's plugins/<platform>.json file before 
adding a platform, so we start with a clean slate.

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to