Skip to content

Commit

Permalink
fix(bug): Mazzy mod has weird question in install script
Browse files Browse the repository at this point in the history
Signed-off-by: dark0dave <[email protected]>
  • Loading branch information
dark0dave committed Dec 13, 2023
1 parent 0677960 commit 9d53756
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/weidu_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub fn parse_raw_output(

fn string_looks_like_question(weidu_output: &str) -> bool {
let comparable_output = weidu_output.trim().to_lowercase();
if comparable_output.contains("installing") {
if comparable_output.contains("installing") || comparable_output.contains("creating") {
return false;
}
(WEIDU_CHOICE.contains(&comparable_output.as_str()))
Expand Down Expand Up @@ -176,4 +176,10 @@ mod tests {
let test = "SUCCESSFULLY INSTALLED Jan's Extended Quest";
assert_eq!(detect_weidu_finished_state(test), Some(State::Completed))
}

#[test]
fn is_not_question() {
let test = "Creating epilogues. Too many epilogues... Why are there so many options here?";
assert_eq!(string_looks_like_question(test), false)
}
}

0 comments on commit 9d53756

Please sign in to comment.