mirror of
https://github.com/jht5945/buildj.git
synced 2025-12-27 17:20:06 +08:00
update if else
This commit is contained in:
@@ -11,9 +11,7 @@ use rust_util::{
|
||||
XResult,
|
||||
};
|
||||
|
||||
use super::misc::{
|
||||
VERBOSE,
|
||||
};
|
||||
use super::misc::VERBOSE;
|
||||
|
||||
pub fn download_url(url: &str, dest: &mut File) -> XResult<()> {
|
||||
if *VERBOSE {
|
||||
|
||||
@@ -75,9 +75,10 @@ pub fn get_macos_java_home(version: &str) -> Option<String> {
|
||||
print_message(MessageType::DEBUG, &format!("java_home outputs: {}", output_in_utf8));
|
||||
}
|
||||
if output_in_utf8.contains("Unable to find any JVMs") {
|
||||
return None;
|
||||
None
|
||||
} else {
|
||||
Some(str::from_utf8(&output.stdout).ok()?.trim().to_string())
|
||||
}
|
||||
Some(str::from_utf8(&output.stdout).ok()?.trim().to_string())
|
||||
}
|
||||
|
||||
pub fn get_local_java_home(version: &str) -> Option<String> {
|
||||
|
||||
Reference in New Issue
Block a user