Configuration merge doesn't make sense for credential-provider #14906
Labels
A-configuration
Area: cargo config files and env vars
A-credential-provider
Area: credential provider for storing and retreiving credentials
C-bug
Category: bug
S-accepted
Status: Issue or feature is accepted, and has a team member available to help mentor or review
Problem
When merging multiple
config.toml
files, Cargo concatenates arrays. For theregistries.….credential-provider
setting this merging is counter-productive, because it constructs an invalid command.Steps
When there's more than one applicable
cargo.toml
file that contains:after merging, it becomes:
and results in Cargo running
command arguments cargo:token-from-stdout command arguments
, which contains wrong arguments, and can fail in very confusing ways.It's particularly easy to end up with exact duplicates of a custom registry configuration when configs are injected by build tools or projects have their own copy in addition to per-user or per-host configs.
Possible Solution(s)
The
credential-provider
field should be replaced, not concatenated, when merging config files.Notes
No response
Version
The text was updated successfully, but these errors were encountered: