deslicer_cli/commands/change/
deploy.rs1use clap::Args as ClapArgs;
2
3use crate::commands::pipeline::{authenticate, map_cli_error};
4use crate::output::emit_change_plan;
5use crate::Ctx;
6
7#[derive(ClapArgs)]
8pub struct Args {
9 #[arg(long)]
10 pub plan_id: String,
11}
12
13pub async fn run(ctx: Ctx, args: Args) -> i32 {
14 let (_session, client) = match authenticate(&ctx, None, None).await {
15 Ok(pair) => pair,
16 Err(err) => return map_cli_error(err),
17 };
18
19 let plan = match client.execute(&args.plan_id).await {
20 Ok(plan) => plan,
21 Err(err) => return map_cli_error(err),
22 };
23
24 emit_change_plan(&plan)
25}