Skip to content

Commit

Permalink
(chocolateyGH-293) Upgrade all except code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Rondeau committed Jul 2, 2015
1 parent a4522b3 commit 96f641a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/chocolatey/infrastructure.app/services/NugetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1047,12 +1047,12 @@ private void set_package_names_if_all_is_specified(ChocolateyConfiguration confi
var localPackages = list_run(config, logResults: false);
var packagesToUpdate = localPackages.Select(p => p.Key).ToList();

if (!String.IsNullOrEmpty(config.UpgradeCommand.PackageNamesToSkip))
if (!String.IsNullOrWhiteSpace(config.UpgradeCommand.PackageNamesToSkip))
{
var packagesToSkip = config.UpgradeCommand.PackageNamesToSkip
.Split(',')
.Select(x => x.Trim())
.Where(x => !String.IsNullOrEmpty(x))
.Where(x => !String.IsNullOrWhiteSpace(x))
.Select(x => x.trim_safe())
.ToList();

var unknownPackagesToSkip = packagesToSkip
Expand All @@ -1061,7 +1061,7 @@ private void set_package_names_if_all_is_specified(ChocolateyConfiguration confi

if (unknownPackagesToSkip.Any())
{
this.Log().Warn(() => "Some packages specified in '-except' were not found in the local packages: '{0}'".format_with(String.Join(",", unknownPackagesToSkip)));
this.Log().Warn(() => "Some packages specified in the 'except' list were not found in the local packages: '{0}'".format_with(String.Join(",", unknownPackagesToSkip)));

packagesToSkip = packagesToSkip
.Where(x => !unknownPackagesToSkip.Contains(x))
Expand All @@ -1074,7 +1074,7 @@ private void set_package_names_if_all_is_specified(ChocolateyConfiguration confi
.Where(x => !packagesToSkip.Contains(x, StringComparer.OrdinalIgnoreCase))
.ToList();

this.Log().Info("These packages will not be upgraded because they were specified in '-except': {0}".format_with(String.Join(",", packagesToSkip)));
this.Log().Info("These packages will not be upgraded because they were specified in the 'except' list: {0}".format_with(String.Join(",", packagesToSkip)));
}
}

Expand Down

0 comments on commit 96f641a

Please sign in to comment.