Skip to content

Cargo registry.default setting breaks registry checks #921

@wichert

Description

@wichert

I have a package that can only be published to some internal repositories:

[package]
publish = ["myregistry-prod", "myregistry-dev"]

both registries are correctly configured in .cargo/config.toml. Setting the version is not possible for us:

$ cargo release version --no-confirm -x 0.4.0
error: failed to get package content for /home/runner/work/mypackage/Cargo.toml: error: `mypackage` cannot be packaged.
The registry `myregistry` is not listed in the `package.publish` value in Cargo.toml.

I see two issues here:

  1. why does version do a registry check? It should only update the version number
  2. if this check is necessary, it should be possible to pass --registry to the version command, similar to publish --registry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions