summary history branches tags files
commit:f1facf30a992ef2c657a59b99515fa37a7eb878f
author:Trevor Bentley
committer:Trevor Bentley
date:Mon Jan 13 23:49:25 2025 +0100
parents:e050474f62760727873134a0ff98b42325120032
fix reading of config settings
diff --git a/src/main.rs b/src/main.rs
line changes: +4/-4
index 81c3b32..9d137fa
--- a/src/main.rs
+++ b/src/main.rs
@@ -282,7 +282,7 @@ impl PwwConfig {
     fn temp_dir(&self) -> Option<PathBuf> {
         match &self.cli {
             Some(c) => c.temp_dir.clone(),
-            _ => Default::default(),
+            _ => self.temp_dir.clone(),
         }
     }
 
@@ -312,7 +312,7 @@ impl PwwConfig {
     }
 
     fn skip_processed(&self) -> bool {
-        self.cli.as_ref().map(|c| c.skip_processed).unwrap_or_default()
+        self.cli.as_ref().map(|c| c.skip_processed).unwrap_or(self.skip_processed)
     }
 
     fn verbose(&self) -> bool {
@@ -325,7 +325,7 @@ impl PwwConfig {
     }
 
     fn halt_on_error(&self) -> bool {
-        self.cli.as_ref().map(|c| c.halt_on_error).unwrap_or_default()
+        self.cli.as_ref().map(|c| c.halt_on_error).unwrap_or(self.halt_on_error)
     }
 
     fn keep_converted(&self) -> bool {
@@ -333,7 +333,7 @@ impl PwwConfig {
     }
 
     fn disable_pww_tag(&self) -> bool {
-        self.cli.as_ref().map(|c| c.disable_pww_tag).unwrap_or_default()
+        self.cli.as_ref().map(|c| c.disable_pww_tag).unwrap_or(self.disable_pww_tag)
     }
 }