Skip to content

Commit

Permalink
(chocolateyGH-238) ApiKey source matching intuitive
Browse files Browse the repository at this point in the history
When matching a source versus the passed in source, be a little more
intuitive about the source itself by matching without the end `/`.
  • Loading branch information
ferventcoder committed Apr 20, 2015
1 parent 998bc44 commit cdc6b50
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -176,7 +176,7 @@ public string get_api_key(ChocolateyConfiguration configuration, Action<ConfigFi

if (!string.IsNullOrWhiteSpace(configuration.Sources))
{
var apiKey = configFileSettings.ApiKeys.FirstOrDefault(p => p.Source.is_equal_to(configuration.Sources));
var apiKey = configFileSettings.ApiKeys.FirstOrDefault(p => p.Source.TrimEnd('/').is_equal_to(configuration.Sources.TrimEnd('/')));
if (apiKey != null)
{
apiKeyValue = NugetEncryptionUtility.DecryptString(apiKey.Key).to_string();
Expand Down

0 comments on commit cdc6b50

Please sign in to comment.