Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (GH-584) Warn on Missing/Outdated Licensed DLL
  (GH-584) Do not error if unable to load type
  • Loading branch information
ferventcoder committed Feb 12, 2016
2 parents 8ae225b + ae70ddf commit ac02da5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/chocolatey.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static void Main(string[] args)
license.AssemblyLoaded = true;
license.Assembly = licensedAssembly;
license.Version = VersionInformation.get_current_informational_version(licensedAssembly);
Type licensedComponent = licensedAssembly.GetType(ApplicationParameters.LicensedComponentRegistry, throwOnError: true, ignoreCase: true);
Type licensedComponent = licensedAssembly.GetType(ApplicationParameters.LicensedComponentRegistry, throwOnError: false, ignoreCase: true);
SimpleInjectorContainer.add_component_registry_class(licensedComponent);
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,13 @@ private static void set_licensed_options(ChocolateyConfiguration config, Chocola
{
if (license.AssemblyLoaded)
{
Type licensedConfigBuilder = license.Assembly.GetType(ApplicationParameters.LicensedConfigurationBuilder, throwOnError: true, ignoreCase: true);
Type licensedConfigBuilder = license.Assembly.GetType(ApplicationParameters.LicensedConfigurationBuilder, throwOnError: false, ignoreCase: true);

if (licensedConfigBuilder == null)
{
"chocolatey".Log().Error(
@"Type expected for registering components was null. Unable to provide
name due to it being null.");
"chocolatey".Log().Warn(ChocolateyLoggers.Important,
@"Unable to set licensed configuration. This is likely related to a
missing or outdated licensed DLL.");
return;
}
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ private static void load_component_registry(Type componentRegistry, Container co
{
if (componentRegistry == null)
{
"chocolatey".Log().Error(
@"Type expected for registering components was null. Unable to provide
name due to it being null.");
"chocolatey".Log().Warn(ChocolateyLoggers.Important,
@"Unable to register licensed components. This is likely related to a
missing or outdated licensed DLL.");
return;
}
try
Expand Down

0 comments on commit ac02da5

Please sign in to comment.