From e2e21c14964c92ad0462fc9b78ccb9b438852d92 Mon Sep 17 00:00:00 2001 From: didirus4 Date: Tue, 8 Jul 2025 23:40:55 +0300 Subject: [PATCH] fix: another try to fix x86 windows arch --- packages/app-lib/src/state/db.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/app-lib/src/state/db.rs b/packages/app-lib/src/state/db.rs index bede894b..e74b30b6 100644 --- a/packages/app-lib/src/state/db.rs +++ b/packages/app-lib/src/state/db.rs @@ -3,6 +3,7 @@ use sqlx::sqlite::{ SqliteConnectOptions, SqliteJournalMode, SqlitePoolOptions, }; use sqlx::{Pool, Sqlite}; +use std::env; use tokio::time::Instant; use std::str::FromStr; use std::time::Duration; @@ -84,8 +85,13 @@ Problem files: async fn fix_modrinth_issued_migrations( pool: &Pool, ) -> crate::Result<()> { - if cfg!(target_os = "windows") && cfg!(target_arch = "x86") { - tracing::warn!("🛑 Skipping migration checksum fix on Windows x86 platform."); + let arch = env::consts::ARCH; + let os = env::consts::OS; + + tracing::info!("Running on OS: {}, ARCH: {}", os, arch); + + if os == "windows" && arch == "x86" { + tracing::warn!("🛑 Skipping migration checksum fix on Windows x86 (runtime-detected)"); return Ok(()); }