command/server: Catch error from core initialization. Fixes #42

This commit is contained in:
Armon Dadgar 2015-04-27 21:29:40 -07:00
parent 607ecb22dc
commit ff352c32fe
1 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,10 @@ func (c *ServerCommand) Run(args []string) int {
LogicalBackends: c.LogicalBackends,
Logger: logger,
})
if err != nil {
c.Ui.Error(fmt.Sprintf("Error initializing core: %s", err))
return 1
}
// If we're in dev mode, then initialize the core
if dev {