Add new opt

This commit is contained in:
2024-07-19 14:24:42 +08:00
committed by GitHub
parent 6f50873592
commit 5221e5a59f
2 changed files with 5 additions and 1 deletions

View File

@@ -112,4 +112,8 @@ impl Config {
pub fn pause_at_exit(&self) -> bool { pub fn pause_at_exit(&self) -> bool {
self.get_bool("pause_at_exit").map(|s| s.to_owned()).unwrap_or(false) self.get_bool("pause_at_exit").map(|s| s.to_owned()).unwrap_or(false)
} }
pub fn pause_on_backup_error(&self) -> bool {
self.get_bool("pause_on_backup_error").map(|s| s.to_owned()).unwrap_or(false)
}
} }

View File

@@ -170,7 +170,7 @@ fn main() -> ExitCode {
1 1
} }
}; };
if m._cfg.pause_at_exit() { if m._cfg.pause_at_exit() || (e == 1 && m._cfg.pause_on_backup_error()) {
utils::enter_continue(); utils::enter_continue();
} }
return ExitCode::from(e); return ExitCode::from(e);