drupal-composer / preserve-paths

A composer plugin for keeping specified files and directories when installing/updating new composer packages. Can be used to supported nested packages.
28 stars 28 forks source link

Updating Drupal core causes duplicate sites dir #4

Closed michaelfavia closed 7 years ago

michaelfavia commented 9 years ago

I've isolated it to a reproducible test case. If you toggle the required package drupal/drupal from 7.38 to 7.36 (or any other version) and composer update it places the sites folder from the drupal core download at the path: "ROOT/sites". In other words the directory that comes with drupal that is usually the ROOT/sites directory can now be found at "ROOT/sites/sites". I'm very happy to help or PR but I'm not yet sure how your plugin works. I assume it should merge (preferring preserved directories) or discard the directory? I'm available on IRC or hangouts at michaelfavia. Thanks for the useful plugin. Best, -mf

Relevant section of my composer.json:

  "extra": {
    "custom-installer": {
      "drupal-module": "docroot/sites/all/modules/contrib/{$name}/",
      "drupal-theme": "docroot/sites/all/themes/contrib/{$name}/",
      "drupal-library": "docroot/sites/all/libraries/{$name}/",
      "drupal-drush": "docroot/sites/all/drush/{$name}/",
      "drupal-profile": "docroot/profiles/{$name}/",
      "drupal-core": "docroot/"
    },
    "preserve-paths": [
      "docroot/sites/all/modules",
      "docroot/sites/all/modules",
      "docroot/sites/all/themes",
      "docroot/sites/all/libraries",
      "docroot/sites/all/drush",
      "docroot/sites/all/vendor",
      "docroot/sites/default/settings.php",
      "docroot/sites/default/files"
    ],
derhasi commented 7 years ago

@michaelfavia could you fix that issue?