Try fix Ubuntu
MODIFY
WalletWasabi/Services/UpdateManager.cs
WalletWasabi/Services/UpdateManager.cs
@@ -16,6 +16,7 @@ namespace WalletWasabi.Services;
public class UpdateManager
{
private string InstallerName { get; set; } = "";
+ private OSPlatform CurrentOS { get; set; }
public UpdateManager(string dataDir, IHttpClient httpClient)
{
@@ -107,11 +108,13 @@ public class UpdateManager
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
+ CurrentOS = OSPlatform.Windows;
var url = urls.Where(url => url.Contains(".msi")).First();
return (url, url.Split("/").Last());
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
+ CurrentOS = OSPlatform.OSX;
var url = urls.Where(url => url.Contains("arm64.dmg")).First();
return (url, url.Split("/").Last());
}
@@ -119,6 +122,7 @@ public class UpdateManager
{
if (RuntimeInformation.OSDescription.Contains("Ubuntu"))
{
+ CurrentOS = OSPlatform.Linux;
var url = urls.Where(url => url.Contains(".deb")).First();
return (url, url.Split("/").Last());
}
@@ -146,9 +150,29 @@ public class UpdateManager
try
{
var installerPath = Path.Combine(DataDir, "Downloads", InstallerName);
- if (File.Exists(installerPath))
+ var cur = CurrentOS;
+ ProcessStartInfo startInfo;
+ if (!File.Exists(installerPath))
{
- ProcessStartInfo startInfo = ProcessStartInfoFactory.Make(installerPath, "", true);
+ throw new FileNotFoundException(installerPath);
+ }
+ if (CurrentOS == OSPlatform.Windows)
+ {
+ startInfo = ProcessStartInfoFactory.Make(installerPath, "", true);
+ }
+ else if (CurrentOS == OSPlatform.Linux)
+ {
+ startInfo = new()
+ {
+ FileName = installerPath,
+ UseShellExecute = false,
+ WindowStyle = ProcessWindowStyle.Normal
+ };
+ }
+ else
+ {
+ startInfo = new(installerPath);
+ }
using Process? p = Process.Start(startInfo);
p!.WaitForExit();
@@ -168,7 +192,6 @@ public class UpdateManager
Logger.LogError("Wasabi installer was terminated.");
}
}
- }
catch (Exception ex)
{
Logger.LogError("Failed to install latest release. File might be corrupted. Deleting...", ex);

Try fix Ubuntu