1
0
mirror of https://github.com/jht5945/buildj.git synced 2025-12-28 01:31:35 +08:00

update if else

This commit is contained in:
2019-08-23 23:58:55 +08:00
parent 689422921f
commit 0fc67544b2
2 changed files with 4 additions and 5 deletions

View File

@@ -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 {

View File

@@ -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> {