From a2565836ac5724ef534eb42324c73087c4926de4 Mon Sep 17 00:00:00 2001 From: Ryan Hileman Date: Fri, 12 Feb 2016 16:39:28 -0800 Subject: [PATCH] don't panic when config directory is empty --- command/server.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/server.go b/command/server.go index a228859b91..f8e985ad0a 100644 --- a/command/server.go +++ b/command/server.go @@ -79,6 +79,12 @@ func (c *ServerCommand) Run(args []string) int { } } + // Ensure at least one config was found. + if config == nil { + c.Ui.Error("No configuration files found.") + return 1 + } + // Ensure that a backend is provided if config.Backend == nil { c.Ui.Error("A physical backend must be specified")