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

cmd: Only validate config is proper JSON if config slice has data #6250

Merged
merged 2 commits into from Apr 18, 2024

Conversation

mohammed90
Copy link
Member

Follow up for #6032. Only validate config is proper JSON if config slice has data.

Without this fix, running caddy run or caddy start without any config (not even Caddyfile around) results in the error:

Error: config is not valid JSON: unexpected end of JSON input; did you mean to use a config adapter (the --adapter flag)?
Error: caddy process exited with error: exit status 1

@mohammed90 mohammed90 added the bug 🐞 Something isn't working label Apr 18, 2024
@mohammed90 mohammed90 added this to the v2.8.0 milestone Apr 18, 2024
@mohammed90 mohammed90 changed the title cmd: fix error when running without config cmd: Only validate config is proper JSON if config slice has data Apr 18, 2024
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks!

@mholt mholt merged commit 8f87c5d into master Apr 18, 2024
25 checks passed
@mholt mholt deleted the fix-run-no-config branch April 18, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants