aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 33558b4b..d874455e 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -36,6 +36,12 @@ pub(crate) fn app_dir_name() -> &'static str {
io::app_dir_name()
}
+#[cfg(test)]
+pub(crate) fn test_config_env_lock() -> &'static std::sync::Mutex<()> {
+ static LOCK: std::sync::OnceLock<std::sync::Mutex<()>> = std::sync::OnceLock::new();
+ LOCK.get_or_init(|| std::sync::Mutex::new(()))
+}
+
impl Config {
pub fn should_show_onboarding(&self) -> bool {
self.onboarding.unwrap_or(true)