From 7631b9d28afef8d9a39eb3635fdc94f15160db85 Mon Sep 17 00:00:00 2001
From: Daniel <dhaavi@users.noreply.github.com>
Date: Mon, 18 Dec 2023 17:09:07 +0100
Subject: [PATCH] Expose SaveConfig for writing config to disk

---
 config/persistence.go | 4 ++--
 config/set.go         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/persistence.go b/config/persistence.go
index 5f37804..7755846 100644
--- a/config/persistence.go
+++ b/config/persistence.go
@@ -58,10 +58,10 @@ func loadConfig(requireValidConfig bool) error {
 	return nil
 }
 
-// saveConfig saves the current configuration to file.
+// SaveConfig saves the current configuration to file.
 // It will acquire a read-lock on the global options registry
 // lock and must lock each option!
-func saveConfig() error {
+func SaveConfig() error {
 	optionsLock.RLock()
 	defer optionsLock.RUnlock()
 
diff --git a/config/set.go b/config/set.go
index daeef6a..2c40ca2 100644
--- a/config/set.go
+++ b/config/set.go
@@ -187,7 +187,7 @@ func setConfigOption(key string, value any, push bool) (err error) {
 	// finalize change, activate triggers
 	signalChanges()
 
-	return saveConfig()
+	return SaveConfig()
 }
 
 // SetDefaultConfigOption sets a single value in the (fallback) default config.