extiverse / bazaar

The extension marketplace for your Flarum forum.
https://discuss.flarum.org/d/5151
MIT License
59 stars 14 forks source link

Composer is not using the assigned composer-home #62

Closed clarkwinkelmann closed 7 years ago

clarkwinkelmann commented 7 years ago

Composer does not create or use the composer-home folder as assigned via ENV variable and ends up downloading every package every time.

It looks like it uses the storage/cache folder but clears it after it's done. Webserver has full write access to storage so it does not seems to be permission-related.

System: Ubuntu 16.04

clarkwinkelmann commented 7 years ago

I'm the one who broke it in https://github.com/flagrow/bazaar/commit/af47351db16b2cf80aee01df5d946f1e5df7ec2a

You can't use storagePath by passing a path as parameter like with laravel paths helpers

clarkwinkelmann commented 7 years ago

Story of why everything was very bad:

storagePath('composer-home') in fact returns [root]/storage. Composer puts its cached files in $COMPOSER_HOME/cache by default.

So Composer was indeed using cache files (in the wrong folder), but we cleared that storage/cache folder after every install, destroying every Composer cached file :cry:

luceos commented 7 years ago

Using fixed or closes will close the issue I guess :)