mirror of
https://github.com/lifegpc/game-auto-sync.git
synced 2026-07-08 01:30:49 +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())
|
.map(|s| s.to_owned())
|
||||||
.unwrap_or(true)
|
.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 {
|
if !ok {
|
||||||
println!("Run failed: {:?}.", e);
|
println!("Run failed: {:?}.", e);
|
||||||
if !utils::ask_continue() {
|
if !self._cfg.continue_when_run_failed() && !utils::ask_continue() {
|
||||||
return Err(Error::Exited);
|
return Err(Error::Exited);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user