-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Persist a .gitkeep file in classmaps directory #51
Comments
I don't like this. In most of my use cases I think a better solution to your problem, if I'm understanding it correctly, is that Mozart should not delete the Then you can use .gitkeep if you like, without it being deleted. And I could continue my PR to delete the directory if it's empty. |
Mark, I think my PR #55 addresses your need. But, TBH, I don't actually understand your real problem. Can you post a composer.json that I can use to reproduce the |
@BrianHenryIE Answered more fully here! #55 (comment) Here is the minimal {
"name": "markjaquith/test",
"autoload" : {
"classmap": [
"classes"
]
}
} Drop that as
|
If your specific Composer/Mozart install doesn't have any classmaps, Mozart will generate an empty classmaps directory, and delete any other files in it. But then you can't check that directory in (because Git only knows about files, not directories). And because you can't check that directory in, a
composer install
after agit clone
will generate aRuntimeException
:Normally I'd solve this by putting a
.gitkeep
file in my classmaps directory. But Mozart deletes that after everycomposer update
run, so now the working directory has unnecessary changes that I don't want to check in.I think my ideal solution here would be for Mozart to ignore non-PHP files in the classmaps directory. That'd allow me to persist a
.gitkeep
, which would ensure that the directory always exists.The text was updated successfully, but these errors were encountered: