Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preserve-path not retaining the directories whenever composer update or install action #41

Open
sandykadam opened this issue Mar 16, 2022 · 3 comments

Comments

@sandykadam
Copy link

sandykadam commented Mar 16, 2022

I'm using latest version of preserve-path i.e 0.1.6.

I have following code for my D7 project:


 "installer-paths": {
      "dist/": [ "type:drupal-core" ],
      "dist/sites/all/libraries/{$name}": [ "type:drupal-library"],
      "dist/sites/all/modules/custom/{$name}": [ "type:drupal-custom-module" ],
      "dist/sites/all/modules/contrib/{$name}": [ "type:drupal-module" ],
      "dist/sites/all/themes/shared/{$name}": [ "type:drupal-custom-theme" ],
      "dist/sites/all/themes/contrib/{$name}": [ "type:drupal-theme" ]
    },
    "preserve-paths": [
      "dist/sites/myproject.com
    ]

There are already custom modules in dist/sites/myproject.com/modules/custom/module_name location which needs to be there everytime but whenever I do composer update or install it removes "dist" directory and again setup. It is not preserving the path which I have define to preserve.

@driskell
Copy link

driskell commented Feb 8, 2023

Can you provide your module require list. And try changing preserve paths to just the module and theme folders to preserve rather than the top level tree?

I reported an issue with meta packages and overlapping preserve paths like this
in #42 .

@sandykadam
Copy link
Author

sandykadam commented Feb 9, 2023

Hi @driskell

Thanks for checking. Your comment about adding full path of modules/themes instead of top-level tree how does it differ to the example you gave In your comment #42 (comment)

There also you have mentioned all instead of sitename but still doesn't work for you.

@sandykadam
Copy link
Author

sandykadam commented Apr 6, 2024

Since there is no activity on this repo, I have created my own forked repo and fixed all the issues, if anybody interested then please use this version https://github.com/sandykadam/preserve-paths/releases/tag/0.4. Tested with PHP8 as well.

composer require sandykadam/preserve-paths

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants