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

ASF subversion and git services commented on CB-8651:
-----------------------------------------------------

Commit e6c940d2adc501e08ca6e7a1a969191c2daef4df in cordova-lib's branch 
refs/heads/master from [~TimBarham]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=e6c940d ]

CB-8651 Restoring platforms causes plugin install to be triggered twice  (close 
#196)

If you add a platform and there are plugins listed in config.xml, those plugins 
get added twice. One during prepare(), when we add all plugins listed in 
config.xml, and once in platform.add(), when we add all installed plugins to 
the new platform.

Both these cases are needed in different scenarios, so the easiest fix seemed 
to be to check for and ignore plugins that have already been installed for a 
platform, in installPluginsForNewPlatform().


> Restoring platforms and plugins causes plugin install to be triggered twice
> ---------------------------------------------------------------------------
>
>                 Key: CB-8651
>                 URL: https://issues.apache.org/jira/browse/CB-8651
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>            Reporter: Connor Pearson
>            Assignee: Tim Barham
>            Priority: Minor
>
> Using the basic starter app with the following config.xml:
> {code:xml}
> <?xml version='1.0' encoding='utf-8'?>
> <widget id="io.cordova.hellocordova" version="0.0.1" 
> xmlns="http://www.w3.org/ns/widgets"; 
> xmlns:cdv="http://cordova.apache.org/ns/1.0";>
>     <name>HelloCordova</name>
>     <content src="index.html" />
>     <access origin="*" />
>     <engine name="ios" version="3.8.0" />
>     <feature name="Device">
>         <param name="id" value="org.apache.cordova.device" />
>     </feature>
> </widget>
> {code}
> Running cordova prepare ios without a platforms or plugins directory produces 
> this output:
> {quote}
> Restoring platform [email protected] referenced on config.xml
> Adding ios project...
> iOS project created with [email protected]
> Discovered org.apache.cordova.device in config.xml. Installing to the project
> Fetching plugin "org.apache.cordova.device" via plugin registry
> Installing "org.apache.cordova.device" for ios
> Plugin "org.apache.cordova.device" already installed on ios.
> {quote}
> It looks like Cordova is trying to install the plugin twice.



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