Don't error if the given data-dir doesn't exist
This commit is contained in:
parent
f93567ac78
commit
5d03ab53f3
|
@ -213,8 +213,10 @@ func (c *Command) readConfig() *Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
if finfo, err := os.Stat(config.DataDir); err != nil {
|
if finfo, err := os.Stat(config.DataDir); err != nil {
|
||||||
c.Ui.Error(fmt.Sprintf("Error getting data-dir: %s", err))
|
if !os.IsNotExist(err) {
|
||||||
return nil
|
c.Ui.Error(fmt.Sprintf("Error getting data-dir: %s", err))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
} else if !finfo.IsDir() {
|
} else if !finfo.IsDir() {
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue