Skip to content

Commit

Permalink
Fix the java version question (#54)
Browse files Browse the repository at this point in the history
* Fix the Java Version

* Test
  • Loading branch information
NekoYyang authored Jan 4, 2023
1 parent a02f711 commit a969589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ async fn main() {
let _ = fs::remove_dir_all("java");
}

print!("Java version (8, 11, 17, 18), default: 17): ");
print!("Java version (11, 17, 18), default: 17): ");
let mut ver = str_to_int(&read_line());
ver = if (8..=20).contains(&ver) { ver } else { 17 };
ver = if (11..=20).contains(&ver) { ver } else { 17 };

print!("JRE or JDK (1: JRE, 2: JDK, default: JRE): ");
let jre = if str_to_int(&read_line()) == 2 {
Expand Down

0 comments on commit a969589

Please sign in to comment.