From cdc6b5066af90ac75713a0b00f344d6652764f34 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Mon, 20 Apr 2015 17:52:18 -0500 Subject: [PATCH] (GH-238) ApiKey source matching intuitive When matching a source versus the passed in source, be a little more intuitive about the source itself by matching without the end `/`. --- .../services/ChocolateyConfigSettingsService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs index f45624b3e9..47f8a410c9 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs @@ -176,7 +176,7 @@ public string get_api_key(ChocolateyConfiguration configuration, Action 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();