From e475550004c4d2a91c8bb4cbb631318a778d4e33 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 3 Feb 2024 19:02:03 +0100 Subject: [PATCH] feat: with cuddle x render args Signed-off-by: kjuulh --- crates/cuddle-ci/src/cuddle_x.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/cuddle-ci/src/cuddle_x.rs b/crates/cuddle-ci/src/cuddle_x.rs index 3695adc..ab9437f 100644 --- a/crates/cuddle-ci/src/cuddle_x.rs +++ b/crates/cuddle-ci/src/cuddle_x.rs @@ -36,9 +36,18 @@ impl CuddleX { pub mod well_known { use super::CuddleX; - pub async fn render() -> eyre::Result<()> { + pub async fn render(args: impl IntoIterator>) -> eyre::Result<()> { tracing::info!("running render"); - let (stdout, stderr, status) = CuddleX::command("render").run().await?; + + let mut cmd = CuddleX::command("render"); + + for arg in args.into_iter() { + let arg = arg.into(); + + cmd.arg(arg); + } + + let (stdout, stderr, status) = cmd.run().await?; for line in stdout.lines() { tracing::trace!("render: {}", line);