Merge branch 'create-config-dir' of sloum/bombadillo into develop

Looks good to me! Thanks for jumping on this so quickly. I also am very confused as to why the panic does not display any output in this case...
This commit is contained in:
jboverf 2019-12-04 07:39:02 -05:00 committed by Gitea
commit c64d06610e
1 changed files with 7 additions and 1 deletions

View File

@ -94,7 +94,13 @@ func lowerCaseOpt(opt, val string) string {
}
func loadConfig() error {
file, err := os.Open(bombadillo.Options["configlocation"] + "/.bombadillo.ini")
err := os.MkdirAll(bombadillo.Options["configlocation"], 0755)
if err != nil {
return fmt.Errorf("Error creating configlocation: %s", err.Error())
}
fp := filepath.Join(bombadillo.Options["configlocation"], ".bombadillo.ini")
file, err := os.Open(fp)
if err != nil {
err = saveConfig()
if err != nil {