Skip to content

Commit f366880

Browse files
committed
admin/delete_crate: Add --message CLI option
1 parent 0cac0b2 commit f366880

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/crates-admin/delete_crate.rs

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ pub struct Opts {
3333
/// Your GitHub username.
3434
#[arg(long)]
3535
deleted_by: String,
36+
37+
/// An optional message explaining why the crate was deleted.
38+
#[arg(long)]
39+
message: Option<String>,
3640
}
3741

3842
pub async fn run(opts: Opts) -> anyhow::Result<()> {
@@ -82,6 +86,7 @@ pub async fn run(opts: Opts) -> anyhow::Result<()> {
8286
.created_at(&created_at)
8387
.deleted_at(&now)
8488
.deleted_by(deleted_by.id)
89+
.maybe_message(opts.message.as_deref())
8590
.available_at(&now)
8691
.build();
8792

0 commit comments

Comments
 (0)