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

composer vendor-expose overwrite folder with broken synlink #11

Open
maxime-rainville opened this issue Jul 10, 2018 · 4 comments
Open

Comments

@maxime-rainville
Copy link

Let's say you create a file under app/css/bob.css and update your project composer.json file like this:

{
"extra": {
        "expose": [
            "app/css"
        ]
    }
}

If you run a composer vendor-expose, bob.css and the css will be deleted and a new app/css symlink will be created. That symlink will point to a broken ../../../app/css location.

@maxime-rainville
Copy link
Author

Setting impact as high because it destroy files.

@xini
Copy link

xini commented Aug 23, 2018

Confirming this on Windows. It seems that app/css is just deleted on Windows though.
On Mac and Ubuntu it seems to be working.

Update: an update to the latest composer version has fixed this for me.

@wilr
Copy link
Member

wilr commented Jul 12, 2019

@maxime-rainville I can confirm this still happens unfortunately! Updating to latest composer (1.8.6 doesn't help)

@b-rhodes
Copy link

b-rhodes commented Jul 24, 2020

I duplicated this as well, but only when there was an existing symlink to a containing folder.
In my case I changed from:

"expose": [
    "themes/base"
],

to this:

"expose": [
    "themes/base/build",
    "themes/base/images",
    "themes/base/icons",
    "themes/base/fonts"
],

To fix this, I manually removed the symlink to themes/bos, made the changes, then ran composer vendor-expose and it worked fine.

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

No branches or pull requests

4 participants