0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

Merge pull request #1431 from mholt/issue1388c

Fix for #1388 starting with no Caddyfile
This commit is contained in:
Toby Allen 2017-02-14 10:23:46 +00:00 committed by GitHub
commit 2417d70bcb

View file

@ -55,6 +55,10 @@ func init() {
func hideCaddyfile(cctx caddy.Context) error {
ctx := cctx.(*httpContext)
for _, cfg := range ctx.siteConfigs {
// if no Caddyfile exists exit.
if cfg.originCaddyfile == "" {
return nil
}
absRoot, err := filepath.Abs(cfg.Root)
if err != nil {
return err