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

@ -112,6 +112,8 @@ class Build : NukeBuild
Target Publish => _ => _ Target Publish => _ => _
.DependsOn(Pack, CreateAndPushGitTag) .DependsOn(Pack, CreateAndPushGitTag)
.Executes(() => .Executes(() =>
{
try
{ {
DotNetTasks.DotNetNuGetAddSource(c => c DotNetTasks.DotNetNuGetAddSource(c => c
.EnableStorePasswordInClearText() .EnableStorePasswordInClearText()
@ -119,6 +121,11 @@ class Build : NukeBuild
.SetPassword(GiteaPackageOwnerPassword) .SetPassword(GiteaPackageOwnerPassword)
.SetName("Gitea") .SetName("Gitea")
.SetSource($"{GiteaNugetSourceName}/index.json")); .SetSource($"{GiteaNugetSourceName}/index.json"));
}
catch (Exception e)
{
Log.Warning("Error adding Gitea source: {e}", e);
}
DotNetTasks.DotNetNuGetPush(s => s DotNetTasks.DotNetNuGetPush(s => s
.SetSource($"{GiteaNugetSourceName}/symbols") .SetSource($"{GiteaNugetSourceName}/symbols")