22# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
33#
44# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
5- # under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
5+ # under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
66# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
77#
88# This script needs to be called in every job that will restore packages and which the base repo has
@@ -37,7 +37,7 @@ Set-StrictMode -Version 2.0
3737# Add source entry to PackageSources
3838function AddPackageSource ($sources , $SourceName , $SourceEndPoint , $creds , $Username , $Password ) {
3939 $packageSource = $sources.SelectSingleNode (" add[@key='$SourceName ']" )
40-
40+
4141 if ($packageSource -eq $null )
4242 {
4343 $packageSource = $doc.CreateElement (" add" )
@@ -48,7 +48,7 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
4848 else {
4949 Write-Host " Package source $SourceName already present."
5050 }
51-
51+
5252 AddCredential - Creds $creds - Source $SourceName - Username $Username - Password $Password
5353}
5454
@@ -89,7 +89,7 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Passw
8989 $maestroPrivateSources = $Sources.SelectNodes (" add[contains(@key,'darc-int')]" )
9090
9191 Write-Host " Inserting credentials for $ ( $maestroPrivateSources.Count ) Maestro's private feeds."
92-
92+
9393 ForEach ($PackageSource in $maestroPrivateSources ) {
9494 Write-Host " `t Inserting credential for Maestro's feed:" $PackageSource.Key
9595 AddCredential - Creds $creds - Source $PackageSource.Key - Username $Username - Password $Password
0 commit comments