@@ -94,41 +94,48 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
...
@@ -94,41 +94,48 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
}
}
}
}
try{
if(!(Test-Path$ConfigFile-PathTypeLeaf)){
if(!(Test-Path$ConfigFile-PathTypeLeaf)){
Write-PipelineTelemetryError-Category'Build'-Message"Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
Write-PipelineTelemetryError-Category'Build'-Message"Couldn't find the file NuGet config file: $ConfigFile"
ExitWithExitCode1
ExitWithExitCode1
}
}
# Load NuGet.config
if(!$Password){
$doc=New-ObjectSystem.Xml.XmlDocument
Write-PipelineTelemetryError-Category'Build'-Message'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
$filename=(Get-Item$ConfigFile).FullName
ExitWithExitCode1
$doc.Load($filename)
}
# Get reference to <PackageSources> or create one if none exist already
Write-PipelineTelemetryError -Category'Build'-Message"Couldn't find the file NuGet config file: $ConfigFile"
Write-PipelineTelemetryError -Category'Build'"Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
ExitWithExitCode 1
fi
if[-z"$CredToken"];then
Write-PipelineTelemetryError -category'Build'"Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"