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

Fix error when trying to bake with non-existent plugins directory. #911

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

ADmad
Copy link
Member

@ADmad ADmad commented Feb 21, 2023

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

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
@ADmad ADmad added this to the 2.x (CakePHP 4) milestone Feb 21, 2023
@dereuromark dereuromark merged commit 4e1ac8f into 2.x Feb 21, 2023
@dereuromark dereuromark deleted the issue-909 branch February 21, 2023 07:06
@LordSimal
Copy link
Contributor

I don't understand why Configure::read('Bake.theme') ?: null, needs to be specified here.
If Bake.theme is not present Configure::read will return null anyways. Why would just Configure::read('Bake.theme') not work?
It seems I am missing something...

@dereuromark
Copy link
Member

The theme could also be empty string

@ADmad
Copy link
Member Author

ADmad commented Feb 21, 2023

@LordSimal It's a safe guard against someone setting the theme to an empty string.

@LordSimal
Copy link
Contributor

Just saying: Even with this fix I still get the error from the issue when trying to bake a plugin with a non existent plugins directory...

@LordSimal
Copy link
Contributor

Forget that... I had $this->addPlugin('PluginName'); in my Application.php which I forgot to remove...

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

Successfully merging this pull request may close these issues.

Incorrect message when plugins directory not exists using bake
3 participants