pesde/src/cli/commands/auth/logout.rs
2025-01-02 22:37:27 +01:00

15 lines
287 B
Rust

use crate::cli::auth::set_token;
use clap::Args;
#[derive(Debug, Args)]
pub struct LogoutCommand {}
impl LogoutCommand {
pub async fn run(self, index_url: gix::Url) -> anyhow::Result<()> {
set_token(&index_url, None).await?;
println!("logged out of {index_url}");
Ok(())
}
}