Skip to content

Commit

Permalink
feat: allow missing config file
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmedeski committed Aug 6, 2024
1 parent b33ea83 commit f04aba8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions configurator/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ func (c *RealConfigurator) getConfigFileFromUserConfigDir() (model.Config, error
}
userConfigDir := path.Join(userHomeDir, ".config")
configFilePath := c.configFilePath(userConfigDir)
file, err := c.os.ReadFile(configFilePath)
if err != nil {
return config, fmt.Errorf("couldn't read config file: %q", err)
}
file, _ := c.os.ReadFile(configFilePath)
// TODO: add to debugging logs
// if err != nil {
// return config, fmt.Errorf("couldn't read config file: %q", err)
// }
err = toml.Unmarshal(file, &config)
if err != nil {
return config, fmt.Errorf("couldn't unmarshal config file: %q", err)
Expand Down

0 comments on commit f04aba8

Please sign in to comment.