fix: Windows JSON patch via node, Linux AppImage via APPIMAGE_EXTRACT_AND_RUN
Build Lotus Chat Desktop / prepare (push) Successful in 8s
Build Lotus Chat Desktop / build-linux (push) Failing after 18m17s
Build Lotus Chat Desktop / build-windows (push) Failing after 20m37s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped

Windows: ConvertTo-Json outputs True/False (invalid JSON) and UTF-16
BOM, corrupting tauri.conf.json. Switch to `node -e` which round-trips
JSON correctly.

Linux: linuxdeploy is itself an AppImage and cannot execute inside
Docker without FUSE. APPIMAGE_EXTRACT_AND_RUN=1 makes it self-extract
and run as a plain binary instead.

Also fix unreachable_code warning in check_for_update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 22:52:54 -04:00
parent 858f0e13bd
commit 3be18b8e5d
2 changed files with 8 additions and 10 deletions
+6 -7
View File
@@ -61,14 +61,13 @@ async fn check_for_update(app: tauri::AppHandle) -> Result<UpdateInfo, String> {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
{
use tauri_plugin_updater::UpdaterExt;
match app.updater().map_err(|e| e.to_string())?.check().await {
Ok(Some(update)) => {
return Ok(UpdateInfo { available: true, version: Some(update.version) });
}
Ok(None) => return Ok(UpdateInfo { available: false, version: None }),
Err(e) => return Err(e.to_string()),
}
return match app.updater().map_err(|e| e.to_string())?.check().await {
Ok(Some(update)) => Ok(UpdateInfo { available: true, version: Some(update.version) }),
Ok(None) => Ok(UpdateInfo { available: false, version: None }),
Err(e) => Err(e.to_string()),
};
}
#[cfg(any(target_os = "android", target_os = "ios"))]
Ok(UpdateInfo { available: false, version: None })
}