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

When target location change, data must be moved (not duplicated) #500

Open
mvorisek opened this issue Dec 15, 2021 · 3 comments
Open

When target location change, data must be moved (not duplicated) #500

mvorisek opened this issue Dec 15, 2021 · 3 comments

Comments

@mvorisek
Copy link

Steps to reproduce:

Run composer update with the following config:

{
    "name": "xxx/xxx",
    "type": "library",
    "require": {
        "composer/installers": "^1.0.21",
        "prestashop/ps_specials": "^1.0",
    }
}

and notice module package is installed into /modules/ directory.

now edit the config to:

{
    "name": "xxx/xxx",
    "type": "library",
    "require": {
        "composer/installers": "^1.0.21",
        "prestashop/ps_specials": "^1.0",
    },
    "extra": {
        "installer-disable": [
            "prestashop"
        ]
    }
}

and run composer update again. The prestashop/ps_specials package is not moved (although vendor contains data about the original location), instead a new copy of it is installed to the standard vendor location.

@Seldaek
Copy link
Member

Seldaek commented Mar 18, 2022

Yeah if the installer is disabled there is no way for Composer to know where the package was previously. You'd need to remove the packages, disable the installer then install them again for this to work. I don't see how we can possibly fix that edge case tbh.

@mvorisek
Copy link
Author

I think the target/install local directory is stored in composer metadata.

@Seldaek
Copy link
Member

Seldaek commented Mar 20, 2022

Yes that is true, but some custom installers also allow installing several things in the same path, so it's not like we can simply wipe that old path if the new one is different due to a custom installer being missing, we'd risk deleting user data.

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