|
1 | | -// Copyright (c) Microsoft Corporation. All rights reserved. |
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
2 | 2 | // Licensed under the MIT License. |
3 | 3 |
|
4 | 4 | using Microsoft.PowerShell.PSResourceGet.UtilClasses; |
@@ -95,10 +95,39 @@ public IEnumerable<PSResourceInfo> GetPackagesFromPath( |
95 | 95 | bool selectPrereleaseOnly) |
96 | 96 | { |
97 | 97 | _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath()"); |
| 98 | + if (name.Length < 1 ) |
| 99 | + { |
| 100 | + _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath() :: length of names less than 1"); |
| 101 | + } |
| 102 | + if (pathsToSearch.Count < 1 ) |
| 103 | + { |
| 104 | + _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath() :: length of pathsToSearch less than 1"); |
| 105 | + } |
| 106 | + |
98 | 107 | List<string> pkgPathsByName = FilterPkgPathsByName(name, pathsToSearch); |
99 | 108 |
|
| 109 | + _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath():: entering filterpkgpathsbyversion"); |
| 110 | + if (versionRange == null ) |
| 111 | + { |
| 112 | + _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath() :: versionRange is null"); |
| 113 | + } |
| 114 | + if (pkgPathsByName.Count < 1 ) |
| 115 | + { |
| 116 | + _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath() :: length of pkgPathsByName less than 1"); |
| 117 | + } |
| 118 | + |
| 119 | + if (_scriptDictionary == null) |
| 120 | + { |
| 121 | + _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath() :: _scriptDictionary is null"); |
| 122 | + } |
| 123 | + |
100 | 124 | foreach (string pkgPath in FilterPkgPathsByVersion(versionRange, pkgPathsByName, selectPrereleaseOnly)) |
101 | 125 | { |
| 126 | + if (pkgPath == null) |
| 127 | + { |
| 128 | + _cmdletPassedIn.WriteDebug("In GetHelper::GetPackagesFromPath() :: pkgPath is null"); |
| 129 | + } |
| 130 | + |
102 | 131 | PSResourceInfo pkg = OutputPackageObject(pkgPath, _scriptDictionary); |
103 | 132 | if (pkg != null) |
104 | 133 | { |
|
0 commit comments