[ https://issues.apache.org/jira/browse/CB-11777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15440030#comment-15440030 ]
ASF GitHub Bot commented on CB-11777: ------------------------------------- GitHub user dpogue opened a pull request: https://github.com/apache/cordova-lib/pull/487 CB-11777: Restore plugins before preparing When running `cordova prepare` to restore platforms and plugins, the platform has prepare called before the plugins are restored. This leads to the top-level config.xml data being copied into the platform at prepare time, and then plugin config being appended when they are later restored. In my case, this was causing the Crosswalk version defined in my top-level config.xml to be overwritten by an undefined version when the plugin was installed. A workaround is to run `cordova prepare` a second time. A better fix is probably to restore the platforms, restore the plugins, and then run prepare after everything has been restored. All the existing tests pass, but this does change the order of operations around the prepare hooks, and I'm not certain if other projects/plugins have dependencies on that ordering. /cc @vladimir-kotikov You can merge this pull request into a Git repository by running: $ git pull https://github.com/dpogue/cordova-lib prepare-plugins Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/487.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 #487 ---- commit 4ea9b2a8ccaf16393ad07df168e09ea29a85b009 Author: Darryl Pogue <dar...@ayogo.com> Date: 2016-08-26T22:10:52Z CB-11777: Restore plugins before preparing ---- > Plugins superseding config.xml > ------------------------------ > > Key: CB-11777 > URL: https://issues.apache.org/jira/browse/CB-11777 > Project: Apache Cordova > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: CordovaLib > Affects Versions: 3.5.0 > Reporter: Darryl Pogue > Assignee: Vladimir Kotikov > > The ongoing saga of CB-11589 and CB-11698... > When running {{cordova prepare}} to restore platforms and plugins, the > platform has prepare called before the plugins are restored. This leads to > the top-level config.xml data being copied into the platform at prepare time, > and then plugin config being appended when they are later restored. > In my case, this was causing the Crosswalk version defined in my top-level > config.xml to be overwritten by an undefined version when the plugin was > installed. A workaround is to run {{cordova prepare}} a second time. > A better fix is probably to restore the platforms, restore the plugins, and > then run prepare after everything has been restored. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org