Rationale - I am actually using Publish-Module PS function to publish a PS module. This function internally calls either nuget.exe or dotnet.exe nuget to actually push the PS module package.
Unfortunately, this function does not pass the -ConfigFile argument effectively forcing us to use the user level $env:APPDATA\NuGet\NuGet.config file.
Why the file matters? The repo requires Access Token to authenticate. I do not know any other way except record it in the NuGet.config file. If there is one that would spare the config file at all - I will gladly use it.
So I am looking for one of the following:
- Provide a custom NuGet.Config location to NuGet.exe without
-ConfigFileargument. E.g. - through a well-known environment variable. - Eliminate the need for NuGet.Config at all by providing the Access Token in the environment or some custom file location, but not the user level NuGet.Config.