Cargo猛拉-从索引中移除一个推动的箱子
cargo yank
[options] --vers
版本 [crate]
yank命令从服务器索引中删除以前发布的箱子版本。此命令不会删除任何数据,箱子仍可通过注册表的下载链接下载。
请注意,锁定到拉扯版本的现有箱子仍然可以下载拉扯版本以使用它。然而,Cargo将不允许任何新的箱子被锁定到任何被拉扯的版本。
此命令要求您通过--token
选择或使用cargo-login(1).
如果未指定箱子名称,它将使用当前目录中的包名称。
--vers
version- The version to yank or un-yank.
--undo
- Undo a yank, putting a version back into the index.
--token
token- API token to use when authenticating. This overrides the token stored in
the credentials file (which is created by cargo-login(1)).
Cargo config environment variables can be used to override the tokens stored in the credentials file. The token for crates.io may be specified with the
CARGO_REGISTRY_TOKEN
environment variable. Tokens for other registries may be specified with environment variables of the formCARGO_REGISTRIES_NAME_TOKEN
whereNAME
is the name of the registry in all capital letters. --index
index- The URL of the registry index to use.
--registry
registry- Name of the registry to use. Registry names are defined in Cargo config
files. If not specified, the default registry is used,
which is defined by the
registry.default
config key which defaults tocrates-io
.
-v
--verbose
- Use verbose output. May be specified twice for "very verbose" output which
includes extra output such as dependency warnings and build script output.
May also be specified with the
term.verbose
config value. -q
--quiet
- Do not print cargo log messages.
May also be specified with the
term.quiet
config value. --color
when- Control when colored output is used. Valid values:
auto
(default): Automatically detect if color support is available on the terminal.always
: Always display colors.never
: Never display colors.
May also be specified with the
term.color
config value.
+
toolchain- If Cargo has been installed with rustup, and the first argument to
cargo
begins with+
, it will be interpreted as a rustup toolchain name (such as+stable
or+nightly
). See the rustup documentation for more information about how toolchain overrides work. -h
--help
- Prints help information.
-Z
flag- Unstable (nightly-only) flags to Cargo. Run
cargo -Z help
for details.
查看the reference有关Cargo读取的环境变量的详细信息。
0
:Cargo成功。101
:Cargo未能完成。
-
从索引中拉出一个箱子:
cargo yank——1.0.7版foo