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

Ensure that config/extensions/bolt-boltforms always gets created by Composer/committed by Git #108

Open
viktor-wolf opened this issue Nov 19, 2022 · 1 comment

Comments

@viktor-wolf
Copy link

I have cloned a project that I hadn't worked on for quite some time to a different machine, I ran composer install and update, and copied over the SQLite database and some assets from the other machine. On the new machine I was getting this error:

An exception has been thrown during the rendering of a template ("The "C:/tools/xampp/vhosts/sitename/config/extensions\bolt-boltforms" directory does not exist.").

The issue seems pretty straightforward, but I got fixated on some wrong initial thoughts. How can a directory be missing, I have committed everything? And why is it looking for a directory, only config files are supposed to be there? Is it looking for the config file of the same name, but it's not working because it's using both forward and back slashes in the path for some reason?

Well, after wasting an embarrassing amount of time, I have figured out that there is actually supposed to be a directory like that in there, but Git didn't commit it because it was empty and Composer didn't create it even though I had tried doing a bunch of stuff with it.

The goof is mine, but I believe there should be a safeguard implemented against situations like this and it should be pretty easy.

Options:

  1. Make the extension not hard require the directory if there's not actually anything in it anyways.
  2. Make Composer always create the directory if it's not present.
  3. Have a .gitkeep in the directory by default.
@bobdenotter
Copy link
Member

Hi, i think option 1 is the most robust. It shouldn't break, if this (optional) folder isn't present! :-)

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