Commit 8779acba authored by Janos Guljas's avatar Janos Guljas

always find home dir in cmd

parent 0e2607e1
......@@ -44,6 +44,11 @@ func newCommand(opts ...option) (c *command, err error) {
o(c)
}
// Find home directory.
if err := c.setHomeDir(); err != nil {
return nil, err
}
c.initGlobalFlags()
if err := c.initStartCmd(); err != nil {
......@@ -79,10 +84,6 @@ func (c *command) initConfig() (err error) {
// Use config file from the flag.
config.SetConfigFile(c.cfgFile)
} else {
// Find home directory.
if err := c.setHomeDir(); err != nil {
return err
}
// Search config in home directory with name ".bee" (without extension).
config.AddConfigPath(c.homeDir)
config.SetConfigName(configName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment