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(cli): validate configuration in CLI cache commands #2146

Merged
merged 1 commit into from
Aug 26, 2021
Merged

fix(cli): validate configuration in CLI cache commands #2146

merged 1 commit into from
Aug 26, 2021

Conversation

oliversalzburg
Copy link
Contributor

Ensures the configuration is checked for validity when executing the affected commands.

Fixes #2145

Ensures the configuration is checked for validity when executing the affected commands.

Fixes #2145
@B4nan
Copy link
Member

B4nan commented Aug 26, 2021

I am quite sure this had a reason, otherwise I would not do this is a separate commit, but as the commit message is empty 🤦...

fbebb30

Let's hope it was due to something that already changed (introduced in v3.0.0), but to be safe let's keep this v5 only.

@B4nan B4nan changed the title fix: config not validated fix(cli): validate configuration in CLI cache commands Aug 26, 2021
@B4nan B4nan merged commit 544583b into mikro-orm:master Aug 26, 2021
@oliversalzburg oliversalzburg deleted the fix/GH2145 branch August 26, 2021 12:29
@oliversalzburg
Copy link
Contributor Author

@B4nan Thanks for merging. I suspected that there would be a good reason for this.

I assume it was because using these two commands doesn't require database details. So you might want to build the metadata cache in an environment that doesn't even have a database. In such a case you'd be required to put dummy configuration in the file to pass validation.

I felt it would be more beneficial to run the validation though. As an invalid configuration can lead to all kinds of confusion.

@oliversalzburg oliversalzburg restored the fix/GH2145 branch February 2, 2022 13:37
@oliversalzburg oliversalzburg deleted the fix/GH2145 branch February 2, 2022 13:39
@oliversalzburg oliversalzburg restored the fix/GH2145 branch February 10, 2022 17:18
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.

Some CLI commands skip config validation
2 participants