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

Initially display errors to stderr for console #14424

Merged
merged 3 commits into from
Feb 18, 2024

Conversation

timkelty
Copy link
Contributor

@timkelty timkelty commented Feb 18, 2024

Description

If someone has a PHP error in a config file, it can be hard to diagnose when running a console command, as it will just return something like exit status 255, instead of something more helpful like:

PHP Parse error:  syntax error, unexpected token "->" in /var/www/html/config/general.php on line 16

Parse error: syntax error, unexpected token "->" in /var/www/html/config/general.php on line 16

Failed to run craft : exit status 255

This forces errors to display to stderr for console apps early to avoid this. Once config is loaded, it will end up resetting this anyway (based on devMode).

@brandonkelly brandonkelly merged commit 1eac34f into develop Feb 18, 2024
@brandonkelly brandonkelly deleted the feature/console-errors-to-stderr branch February 18, 2024 18:48
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.

2 participants