Files
gitnow/crates/gitnow/src/commands/update.rs
kjuulh 17cb06904f
All checks were successful
continuous-integration/drone/push Build is passing
feat: add update command
2024-09-26 21:36:03 +02:00

15 lines
357 B
Rust

use crate::{app::App, cache::CacheApp, projects_list::ProjectsListApp};
#[derive(clap::Parser)]
pub struct Update {}
impl Update {
pub async fn execute(&mut self, app: &'static App) -> anyhow::Result<()> {
let repositories = app.projects_list().get_projects().await?;
app.cache().update(&repositories).await?;
Ok(())
}
}