Adds exception for data-dir check in -dev mode.

This was changed in #2529.
This commit is contained in:
James Phillips 2016-12-14 22:11:16 -08:00
parent 4956a66638
commit d6dc6a1fcc
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 13 additions and 11 deletions

View File

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