preserve-paths
preserve-paths copied to clipboard
preserve-path not retaining the directories whenever composer update or install action
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.
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 https://github.com/drupal-composer/preserve-paths/issues/42 .
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 https://github.com/drupal-composer/preserve-paths/issues/42#issuecomment-1402183384
There also you have mentioned all
instead of sitename but still doesn't work for you.
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