Skip to main content

git_same/commands/
setup.rs

1//! Setup command handler.
2//!
3//! Thin wrapper that launches the interactive setup wizard.
4
5#[cfg(feature = "tui")]
6use crate::cli::SetupArgs;
7#[cfg(feature = "tui")]
8use crate::errors::Result;
9#[cfg(feature = "tui")]
10use crate::output::Output;
11
12/// Run the setup wizard.
13#[cfg(feature = "tui")]
14pub async fn run(_args: &SetupArgs, output: &Output) -> Result<()> {
15    let completed = crate::setup::run_setup().await?;
16    if completed {
17        output.success("Workspace configured successfully");
18        output.info("Run 'gisa sync' to sync your repositories");
19    } else {
20        output.info("Setup cancelled");
21    }
22    Ok(())
23}