-
Notifications
You must be signed in to change notification settings - Fork 379
Description
I have various packages in my packages.config, one of which (Velopack) is a patched version of an existing package. For this I have forked the original project and released a new version into my own gitea nuget registry.
I have added the gitea source to my packages.config and everything works flawlessly in the Unity UI.
But, as I also have the a CI pipeline, the dotnet nugetforunity restore command fails with an exit code of 1. (It does this on the CI and also locally). This is the output:
Restoring NuGet Packages ...
Installing System.Security.Principal.Windows 5.0.0 ...
Restoring NuGet Packages ...
Installing System.Text.Encoding.CodePages 6.0.0 ...
Restoring NuGet Packages ...
Installing System.Threading.Channels 8.0.0 ...
Restoring NuGet Packages ...
There is no package with id 'Velopack' and version '0.0.1374-gb8eac8e' on the registration page.
Installing Velopack 0.0.1374-gb8eac8e ...
Here's the kicker though: It prints this error, exits with non-zero error code, but it actually works.
It correctly installs Version 0.0.1374-gb8eac8e from gitea, another call to dotnet nugetforunity restore works fine (because it's cached I guess), and my code compiles and uses the correctly patched version.
I have "fixed" the problem with using dotnet nugetforunity restore || true but I don't think this is how it's supposed to go.
Is there a nuget.config setting I am missing?