refactor: extract java and maven helpers to net module

This commit is contained in:
objz committed 2025-08-09 14:38:19 +02:00
1 parent 9df5e9a78a
commit cc97c174c1
6 files changed
+49 -59

No files matched your search

+1 -9
View File
@@ -152,15 +152,7 @@ pub async fn run_neoforge_installer(
Ok(())
}
pub fn detect_java_path() -> String {
if let Ok(java_home) = std::env::var("JAVA_HOME") {
let path = std::path::Path::new(&java_home).join("bin").join("java");
if path.exists() {
return path.to_string_lossy().to_string();
}
}
"java".to_string()
}
#[cfg(test)]
mod tests {