|
|
|
@ -205,8 +205,9 @@ func (c *Command) readConfig() *Config {
|
|
|
|
|
config.SkipLeaveOnInt = Bool(config.Server) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Ensure we have a data directory
|
|
|
|
|
if config.DataDir == "" && !dev { |
|
|
|
|
// Ensure we have a data directory if we are not in dev mode.
|
|
|
|
|
if !dev { |
|
|
|
|
if config.DataDir == "" { |
|
|
|
|
c.Ui.Error("Must specify data directory using -data-dir") |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
@ -218,6 +219,7 @@ func (c *Command) readConfig() *Config {
|
|
|
|
|
c.Ui.Error(fmt.Sprintf("The data-dir specified at %q is not a directory", config.DataDir)) |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Ensure all endpoints are unique
|
|
|
|
|
if err := config.verifyUniqueListeners(); err != nil { |
|
|
|
|