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: Fix reload with stdin #4900

Merged
merged 1 commit into from
Jul 21, 2022
Merged

cmd: Fix reload with stdin #4900

merged 1 commit into from
Jul 21, 2022

Conversation

francislavoie
Copy link
Member

@francislavoie francislavoie commented Jul 20, 2022

Fix #4899

The problem was that LoadConfig would be called twice, but when using stdin that isn't possible.

The fix is to pass in the already-loaded config if available to DetermineAdminAPIAddress (which only happens for reload) and nil otherwise, which makes it skip doing its own loading in that case.

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.

Thanks for the patch!

@mholt mholt merged commit abad9bc into master Jul 21, 2022
@mholt mholt deleted the fix-reload-stdin branch July 21, 2022 00:14
@mholt mholt modified the milestones: v2.6.0-beta.1, v2.6.0 Sep 13, 2022
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.

caddy reload from stdin with default admin address fails on versions >= 2.5.0
2 participants