fix: Windows JSON patch via node, Linux AppImage via APPIMAGE_EXTRACT_AND_RUN
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:
@@ -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 })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user