Skip to content

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

@viktor-wolf

Description

@viktor-wolf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions