NetSparkleUpdater / NetSparkle

NetSparkle is a C# cross-platform software update framework for .NET developers compatible with .NET 4.6.2/.NET 6+, WinForms, WPF, and Avalonia; uses Ed25519 or DSA signatures! View basic usage here in the README or visit our website for code docs.
https://netsparkleupdater.github.io/NetSparkle/
MIT License
585 stars 81 forks source link

Missing code paths in InstallUpdate method #576

Closed bdovaz closed 2 months ago

bdovaz commented 2 months ago

I am using the Core package and I am managing all the UI through events and that is why I have detected these cases.

  1. If the file does not exist, there is no event, log, etc. that notifies that the file does not exist and that it cannot proceed:

https://github.com/NetSparkleUpdater/NetSparkle/blob/225fb7be3fee10c262d6c8e3f312fc9cd71bba69/src/NetSparkle/SparkleUpdater.cs#L1221

  1. If the result of the signature verification is Invalid a case similar to the previous one happens, there is no else on that condition that notifies of what happens:

https://github.com/NetSparkleUpdater/NetSparkle/blob/225fb7be3fee10c262d6c8e3f312fc9cd71bba69/src/NetSparkle/SparkleUpdater.cs#L1234

If these 2 cases are not managed it is very difficult to debug what is happening without having to check this repository and its source code.

Deadpikle commented 2 months ago

Thanks! Added InstallUpdateFailed event for those two cases (along with some LogWriter calls) and a couple other cases I noticed. 611eb7c3c362771525a42215bb10b1d895d98ecd and preview rolling out now.