gtx


Branch: develop

Author
thewhodidthis <thewhodidthis@fastmail.com>
Date
Feb. 20 '23 06:30:55
Commit
f1aaa9c43ecf03a1adb96b105c1afa7f9e46b90e
Parent
6c728d248cbaa5f011624dbd288d18a5fc3a5a70
Changes
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)
 }