这是indexloc提供的服务,不要输入任何密码
Skip to content

Publish reads from wrong registry when --registry option provided #79

@leighmcculloch

Description

@leighmcculloch

The cargo workspaces publish command accepts a --registry option that allows for specifying the registry that the publish will occur to. The value is passed down to the cargo publish command successfully.

However, cargo workspaces publish also constructs an Index that is used for checking if the crate is published that when creating that index it ignores the passed in --registry parameter.

This has two impacts:

  • The publish command will check either the default (crates.io) registry or a registry specified in the Cargo.toml file when checking if the version already exists before publishing, rather than checking the specified registry. So it will attempt to republish and error in cases it shouldn't.

  • The publish command will check either the default (crates.io) registry or a registry specified in the Cargo.toml file when checking if the version has successfully been published, rather than checking the specified registry. So it will wait forever thinking the crate has never published.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions