File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,11 @@ public object GetDynamicParameters()
110110 {
111111 PSRepositoryInfo repository = RepositorySettings . Read ( new [ ] { Name } , out string [ ] _ ) . FirstOrDefault ( ) ;
112112 // Dynamic parameter '-CredentialProvider' should not appear for PSGallery, or any container registry repository.
113- if ( repository is not null && repository . Name . Equals ( "PSGallery" , StringComparison . OrdinalIgnoreCase ) ||
114- ( repository . Uri . AbsoluteUri . EndsWith ( ".azurecr.io" ) || repository . Uri . AbsoluteUri . EndsWith ( ".azurecr.io/" ) || repository . Uri . AbsoluteUri . Contains ( "mcr.microsoft.com" ) ) )
113+ // It should also not appear when using the 'Repositories' parameter set.
114+ if ( repository is not null &&
115+ ( repository . Name . Equals ( "PSGallery" , StringComparison . OrdinalIgnoreCase ) ||
116+ RepositoriesParameterSet . Equals ( RepositoriesParameterSet ) ||
117+ repository . Uri . AbsoluteUri . EndsWith ( ".azurecr.io" ) || repository . Uri . AbsoluteUri . EndsWith ( ".azurecr.io/" ) || repository . Uri . AbsoluteUri . Contains ( "mcr.microsoft.com" ) ) )
115118 {
116119 return null ;
117120 }
You can’t perform that action at this time.
0 commit comments