mirror of
https://github.com/lifegpc/game-auto-sync.git
synced 2026-06-14 01:44:16 +08:00
Add new config continue_when_run_failed
This commit is contained in:
@@ -150,4 +150,10 @@ impl Config {
|
||||
.map(|s| s.to_owned())
|
||||
.unwrap_or(true)
|
||||
}
|
||||
|
||||
pub fn continue_when_run_failed(&self) -> bool {
|
||||
self.get_bool("continue_when_run_failed")
|
||||
.map(|s| s.to_owned())
|
||||
.unwrap_or(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ impl Main {
|
||||
};
|
||||
if !ok {
|
||||
println!("Run failed: {:?}.", e);
|
||||
if !utils::ask_continue() {
|
||||
if !self._cfg.continue_when_run_failed() && !utils::ask_continue() {
|
||||
return Err(Error::Exited);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user