Skip to content

Commit

Permalink
Use the same instance of GpgInstallation everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
geluk committed Mar 19, 2020
1 parent a043d77 commit 324eb58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pass-winmenu/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ private void Initialise()
.AsSelf();

// Register GPG installation
builder.Register(context => context.Resolve<GpgInstallationFinder>().FindGpgInstallation(ConfigManager.Config.Gpg.GpgPath));
// Single instance, as there is no need to look for the same GPG installation multiple times.
builder.Register(context => context.Resolve<GpgInstallationFinder>().FindGpgInstallation(ConfigManager.Config.Gpg.GpgPath))
.SingleInstance();

// Register GPG
builder.Register(context => new GPG(
Expand Down

0 comments on commit 324eb58

Please sign in to comment.