Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4711 from toggl-open-source/fix/unit-tests-crash
Browse files Browse the repository at this point in the history
Fix crash in unit tests when initializing UpdateManager
  • Loading branch information
atsvirchkova authored Nov 25, 2020
2 parents c602c12 + c935ad3 commit 556e122
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Threading.Tasks;
using System.Reflection;
using System.Threading.Tasks;
using Onova;
using Onova.Exceptions;
using Onova.Models;
using Onova.Services;

namespace TogglDesktop.Services
Expand All @@ -21,6 +23,7 @@ public UpdateService(bool isUpdateCheckDisabled, string updatesPath)
{
IsUpdateCheckEnabled = !isUpdateCheckDisabled;
_updateManager = new UpdateManager(
AssemblyMetadata.FromAssembly(Assembly.GetEntryAssembly() ?? Assembly.GetAssembly(typeof(UpdateService))),
new LocalPackageResolver(updatesPath, "TogglDesktopInstaller*.exe"),
new NsisPackageExtractor());

Expand Down

0 comments on commit 556e122

Please sign in to comment.