You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update ResponseUtil.ConvertToPSResourceResult() to take a bool parameter to eval if resource name contained wildcard when assessing if pkg version is unlisted
@@ -699,6 +700,12 @@ private IEnumerable<PSResourceInfo> SearchByNames(ServerApiCall currentServer, R
699
700
{
700
701
_cmdletPassedIn.WriteDebug("No version specified, package name is '*'");
701
702
// Example: Find-PSResource -Name "*"
703
+
704
+
// Note: Just for resources from V2 servers, specifically PSGallery, if the resource is unlisted and was requested non-explicitly
705
+
// (i.e requested name has wildcard) the resource should not be returned and ResponseUtil.ConvertToPSResourceResult() call needs to be informed of this.
706
+
// In all other cases, return the resource regardless of whether it was requested explicitly or not.
_cmdletPassedIn.WriteDebug("No version specified, package name contains a wildcard.");
747
754
755
+
// Note: Just for resources from V2 servers, specifically PSGallery, if the resource is unlisted and was requested non-explicitly
756
+
// (i.e requested name has wildcard) the resource should not be returned and ResponseUtil.ConvertToPSResourceResult() call needs to be informed of this.
757
+
// In all other cases, return the resource regardless of whether it was requested explicitly or not.
758
+
boolisResourceRequestedWithWildcard=isV2Resource;
748
759
FindResultsresponses=null;
749
760
if(_tag.Length==0)
750
761
{
@@ -770,7 +781,7 @@ private IEnumerable<PSResourceInfo> SearchByNames(ServerApiCall currentServer, R
0 commit comments