Skip to content

Commit fbb940f

Browse files
committed
build fixes
1 parent ba2d230 commit fbb940f

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/code/FindHelper.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -904,15 +904,13 @@ private IEnumerable<PSResourceInfo> SearchByNames(ServerApiCall currentServer, R
904904
// Example: Find-PSResource -Name "Az" -Version "3.0.0.0"
905905
// Example: Find-PSResource -Name "Az" -Version "3.0.0.0" -Tag "Windows"
906906
_cmdletPassedIn.WriteDebug("Exact version and package name are specified");
907-
907+
string key = string.Empty;
908908
FindResults responses = null;
909909
if (_tag.Length == 0)
910910
{
911-
912-
913911
ConcurrentDictionary<string, Task<FindResults>> cachedNetworkCalls = new ConcurrentDictionary<string, Task<FindResults>>();
914912
Task<FindResults> response = null;
915-
string key = $"{pkgName}|{_nugetVersion.ToNormalizedString()}|{_type}";
913+
key = $"{pkgName}|{_nugetVersion.ToNormalizedString()}|{_type}";
916914
response = cachedNetworkCalls.GetOrAdd(key, _ => currentServer.FindVersionAsync(pkgName, _nugetVersion.ToNormalizedString(), _type, errorMsgs, warningMsgs, debugMsgs, verboseMsgs));
917915

918916
responses = response.GetAwaiter().GetResult();
@@ -1318,7 +1316,7 @@ private PSResourceInfo FindDependencyWithSpecificVersion(
13181316

13191317
string pkgVersion = FormatPkgVersionString(depPkg);
13201318
debugMsgs.Enqueue($"Found dependency '{depPkg.Name}' version '{pkgVersion}'");
1321-
string key = $"{depPkg.Name}{pkgVersion}";
1319+
key = $"{depPkg.Name}{pkgVersion}";
13221320
if (!depPkgsFound.ContainsKey(key))
13231321
{
13241322
// Add pkg to collection of packages found then find dependencies
@@ -1386,7 +1384,7 @@ private PSResourceInfo FindDependencyWithLowerBound(
13861384

13871385
string pkgVersion = FormatPkgVersionString(depPkg);
13881386
debugMsgs.Enqueue($"Found dependency '{depPkg.Name}' version '{pkgVersion}'");
1389-
string key = $"{depPkg.Name}{pkgVersion}";
1387+
key = $"{depPkg.Name}{pkgVersion}";
13901388
if (!depPkgsFound.ContainsKey(key))
13911389
{
13921390
// Add pkg to collection of packages found then find dependencies
@@ -1457,7 +1455,7 @@ private PSResourceInfo FindDependencyWithUpperBound(
14571455

14581456
string pkgVersion = FormatPkgVersionString(depPkg);
14591457
debugMsgs.Enqueue($"Found dependency '{depPkg.Name}' version '{pkgVersion}'");
1460-
string key = $"{depPkg.Name}{pkgVersion}";
1458+
key = $"{depPkg.Name}{pkgVersion}";
14611459
if (!depPkgsFound.ContainsKey(key))
14621460
{
14631461
// Add pkg to collection of packages found then find dependencies

0 commit comments

Comments
 (0)