jasonlewis / basset

A better asset management package for Laravel.

Home Page:http://jasonlewis.me/code/basset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on empty collection

barryvdh opened this issue · comments

This is probably an edge case, but I have a collection, ie 'admin', which can contain both javascript and stylesheet.
So in my head I call @Stylesheets('admin') and in my footer @javascripts('admin'). But when there is no stylesheet, it tries to write to app/storage/meta/collection.json.
This is no problem in development, but when I publish the app to production (with Rocketeer) the following order happens:

  1. Clone, install and set app/storage to 777 recursively.
  2. Build all basset collections (and thus create app/storage/meta/collection.json)
  3. When the previous described case happens, it cannot write to the meta files, because it is created by the CLI user, not web (and before chmodding), so an error occurs, but the layout continues to be created, but using a different layout file (probably because of the error template or something).

So it is pretty strange, but as soon as I remove the stylesheets('admin'), everything worked as useal again.

Obviously this is easy for me to work around, by just removing that line or splitting the collections in css and javascript, but I think this shouldn't actually occur.