Skip to content

Commit afb8ccb

Browse files
committed
Fix some bugs with first time setup / networking
1 parent f2a1853 commit afb8ccb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/http_client.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ pub fn new_http_client() -> ureq::Agent {
22
ureq::Agent::config_builder()
33
.timeout_connect(Some(std::time::Duration::from_secs(5)))
44
.timeout_recv_response(Some(std::time::Duration::from_secs(10)))
5-
.timeout_recv_body(Some(std::time::Duration::from_secs(30)))
65
.timeout_send_request(Some(std::time::Duration::from_secs(10)))
7-
.timeout_send_body(Some(std::time::Duration::from_secs(30)))
86
.user_agent(concat!(
97
env!("CARGO_PKG_NAME"),
108
"/",

src/jdk_manager.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ impl JdkManager {
171171
}
172172
return Err(e);
173173
}
174+
std::fs::create_dir_all(&*JDK_STORE_PATH)
175+
.change_context(JdkManagerError)
176+
.attach_with(|| {
177+
format!(
178+
"Could not create JDK store directory at {:?}",
179+
JDK_STORE_PATH
180+
)
181+
})?;
174182
let unpack_dir = tempfile::tempdir_in(&*JDK_STORE_PATH)
175183
.change_context(JdkManagerError)
176184
.attach("Could not create temporary directory for JDK unpacking")?;

0 commit comments

Comments
 (0)