killing the exception when trying to add a duplicate nuget source
All checks were successful
CI Build / CI Build API (pull_request) Successful in 32s

This commit is contained in:
Michael Samorokov 2025-01-29 23:26:19 -07:00
parent 47bede52d1
commit 7992e3de0f

View File

@ -113,12 +113,19 @@ class Build : NukeBuild
.DependsOn(Pack, CreateAndPushGitTag)
.Executes(() =>
{
DotNetTasks.DotNetNuGetAddSource(c => c
.EnableStorePasswordInClearText()
.SetUsername(GiteaPackageOwnerUser)
.SetPassword(GiteaPackageOwnerPassword)
.SetName("Gitea")
.SetSource($"{GiteaNugetSourceName}/index.json"));
try
{
DotNetTasks.DotNetNuGetAddSource(c => c
.EnableStorePasswordInClearText()
.SetUsername(GiteaPackageOwnerUser)
.SetPassword(GiteaPackageOwnerPassword)
.SetName("Gitea")
.SetSource($"{GiteaNugetSourceName}/index.json"));
}
catch (Exception e)
{
Log.Warning("Error adding Gitea source: {e}", e);
}
DotNetTasks.DotNetNuGetPush(s => s
.SetSource($"{GiteaNugetSourceName}/symbols")