Skip to content

Commit

Permalink
(GH-371) ensure config is properly set
Browse files Browse the repository at this point in the history
When calling into chocolatey.lib, if the Container is accessed
prior to having the configuration all set, any additonal components
that Chocolatey attempts to register will be ignored. This causes
issues with using Chocolatey and registering licensed configuration
and components. Ensure that Chocolatey does get set appropriately
by making a call to do that early in the process load.
  • Loading branch information
ferventcoder committed Jun 12, 2017
1 parent 2e5a7ce commit a12418c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Source/ChocolateyGui.Subprocess/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
using ILogger = Serilog.ILogger;

namespace ChocolateyGui.Subprocess
{
{
using chocolatey;

public class Program
{
public static ManualResetEventSlim CanceledEvent { get; private set; }
Expand Down Expand Up @@ -48,7 +50,11 @@ public static int Main(string[] args)
e.Cancel = true;
CanceledEvent.Set();
source.Cancel();
};
};

// do not remove! Load Chocolatey once so all config gets set
// properly for future calls
var choco = Lets.GetChocolatey();

CanceledEvent = new ManualResetEventSlim();

Expand Down

0 comments on commit a12418c

Please sign in to comment.