use super::*;
#[derive(Debug, Args)]
pub struct Remove {
s3_uri: String,
#[arg(long)]
force: bool,
}
impl Remove {
pub(crate) async fn execute(self, config: &Config) -> S3Result {
let client = S3Client::with_config(config);
let bucket = bucket_name(&self.s3_uri);
if self.force {
client.remove_unversioned_objects(bucket).await?;
}
client.delete_bucket(bucket).await?;
Ok(Box::new(()))
}
}