-
Notifications
You must be signed in to change notification settings - Fork 101
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
Incorrect message when plugins
directory not exists using bake
#909
Comments
I can reproduce this, for some reason the PluginCollection is throwing the exception a bit too eagerly. |
Looks related to cakephp/cakephp#16374 Should we try catch this? |
The error is unrelated to that PR.
bake/src/Command/PluginCommand.php Line 52 in e7e795c
|
It does seem like cakephp/cakephp#16374 uncovered this issue :) |
@kicaj Can you provide the full stack trace please. |
Hmm.. I am unable to reproduce this with the latest core and bake releases. Bake just creates the missing |
I can confirm the error with Here is the stacktrace:
|
Latest versions are cakephp/cakephp 4.4.11 and cakephp/bake 2.8.2 |
This issue still persists for me when using
|
There problem is here. The default value for bake/src/Command/PluginCommand.php Lines 193 to 194 in e7e795c
|
Well then it should be cakephp/bake's command responsibility to make sure the configured plugin directory is present at all, right? If it is not present, create it. |
Bake does create the
|
Then go ahead and fix it yourself. I am unable to fix it with your approach because setting
to
doesn't fix it and I don't understand the difference between making sure the directory is present beforehand and your weird theme approach which should automatically create the directory (which it doesn't for me as well). Why should the |
This was caused due to `Bake.theme` option defaulting to empty string instead of null and hence a plugin with empty name was being searched causing an exception. Closes #909
Description
During creating new plugin using command
bin/cake bake plugin PluginName
with not existedplugins
directory.Bake:
plugins
directory;Bake Version
2.8.2
CakePHP Version
4.4.11
The text was updated successfully, but these errors were encountered: