diff --git a/main.go b/main.go index 25cde79..2c3eb32 100644 --- a/main.go +++ b/main.go @@ -87,12 +87,6 @@ func main() { } } - // Create a separate options instance for reading config file values into. - store := *opt - - // Need deep copy the underlying slice types. - store.Branches = append(store.Branches, opt.Branches...) - // Attempt to read saved settings. cnf, err := os.ReadFile(filepath.Join(dir, opt.config)) @@ -100,6 +94,12 @@ func main() { log.Printf("unable to read config file: %v", err) } + // Create a separate options instance for reading config file values into. + store := *opt + + // Need deep copy the underlying slice types. + store.Branches = append(store.Branches, opt.Branches...) + // If a config file exists and an option has not been set, override default to match. if err := json.Unmarshal(cnf, &store); err != nil { log.Printf("unable to parse config file: %v", err) @@ -191,7 +191,6 @@ func main() { } pro.updateBranches(branches) - pro.writePages(branches) pro.writeMainIndex(branches) }
home › develop › 6c728d2 › f1aaa9c