Skip to content

Fallback packet.config locations #1399

Open
@dcorriveau-omniscient

Description

@dcorriveau-omniscient

From what I can tell from the doc (https://fsprojects.github.io/Paket/paket-config.html), it seems the paket.config file is located in the %appdata%/Paket/ folder and it's the only file used for the config. However, it would be nice if it would use a similar path fallback mechanism like nuget (see: https://docs.nuget.org/consume/nuget-config-file#user-content-nuget-config-extensibility-point). So basically I would like to set my apikey in the solution's .paket/paket.config file so that I could include that file in source control so that the whole team would be able to automatically push their packaged project to our nuget server automatically using that apikey. We have a post-build batch file that is executed when we set the config to Release and that automatically packages and pushes the newly built project to the nuget server. I don't want to tell every developer to run a command to add the apikey to their %appdata%/Paket/paket.config file.

For the moment I could probably add that command to the batch file, so it will automatically be executed before the push, but it's not very elegant.

Edit: Well, the correct way to do this for me is to simply use apikey when using the push command. However when working on this I found a message that seems a bit misleading. When I use the push command and the file isn't OK (for example if you specify a directory with no files in it), I get the message Could not push package ..\NugetPackages" apikey thisisanapikey. Please specify a NuGet API key via environment variable "nugetkey".. It should probably first check if my package parameter is valid (file exists), and tell me that it's not instead of hinting at the apikey right away.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions