Files
tldr/pages.zh/common/cargo-yank.md

17 lines
641 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# cargo yank
> 从索引中移除已推送的 crate。只有在意外发布了严重损坏的 crate 时才应使用此功能。
> 注意这不会删除任何数据。yank 之后crate 仍然存在 - 这只是阻止新项目使用它。
> 更多信息:<https://doc.rust-lang.org/cargo/commands/cargo-yank.html>。
- yank 指定版本的 crate
`cargo yank {{crate}}@{{version}}`
- 撤销 yank即允许再次下载
`cargo yank --undo {{crate}}@{{version}}`
- 使用指定的注册表(注册表名称可以在配置中定义 - 默认是 <https://crates.io>
`cargo yank --registry {{name}} {{crate}}@{{version}}`