2 Commits
Author SHA1 Message Date
objz 158549f7e4 chore(release): prepare for 0.6.4 2026-10-29 16:38:01 +01:00
objz 66062a6427 fix: avoid spurious warnings during instance installation 2026-10-29 16:37:04 +01:00
5 changed files with 10 additions and 7 deletions

No files matched your search

Generated
+1 -1
View File
@@ -3856,7 +3856,7 @@ dependencies = [
[[package]]
name = "rmcl"
version = "0.6.3"
version = "0.6.4"
dependencies = [
"async-trait",
"base64",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "rmcl"
version = "0.6.3"
version = "0.6.4"
authors = ["objz"]
edition = "2024"
description = "A fully featured Minecraft TUI launcher"
+1 -1
View File
@@ -632,7 +632,7 @@ impl InstanceManager {
let config_path = self.instances_dir.join(name).join("instance.json");
if !config_path.exists() {
tracing::warn!(
tracing::debug!(
"Instance '{}' config is missing at {}",
name,
config_path.display()
+2 -2
View File
@@ -522,8 +522,8 @@ pub async fn download_assets_from(
serde_json::from_slice(&bytes).ok()
}
Ok(_) => {
tracing::warn!(
"Invalid cached asset index at {}; fetching again",
tracing::debug!(
"Cached asset index at {} does not match the requested version; fetching again",
index_path.display()
);
None
+5 -2
View File
@@ -411,8 +411,11 @@ async fn download_assets_writes_index_when_objects_is_empty() {
assert!(body.get("objects").is_some());
}
#[rstest::rstest]
#[case(b"{\"objects\":{\"fake\":{}}}")]
#[case(b"{\"objects\":{},\"virtual\":false}")]
#[tokio::test]
async fn invalid_cached_index_is_refetched() {
async fn mismatched_cached_index_is_refetched(#[case] cached: &[u8]) {
let server = MockServer::start().await;
let body = serde_json::to_vec(&json!({"objects": {}})).unwrap();
Mock::given(method("GET"))
@@ -426,7 +429,7 @@ async fn invalid_cached_index_is_refetched() {
let tmp = tempfile::tempdir().unwrap();
let index_path = tmp.path().join("cache/minecraft/assets/indexes/5.json");
std::fs::create_dir_all(index_path.parent().unwrap()).unwrap();
std::fs::write(&index_path, b"{\"objects\":{\"fake\":{}}}").unwrap();
std::fs::write(&index_path, cached).unwrap();
download_assets(&HttpClient::new(), &meta, tmp.path())
.await