feat: with cuddle x render args
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-02-03 19:02:03 +01:00
parent 512c3f625e
commit e475550004
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -36,9 +36,18 @@ impl CuddleX {
pub mod well_known { pub mod well_known {
use super::CuddleX; use super::CuddleX;
pub async fn render() -> eyre::Result<()> { pub async fn render(args: impl IntoIterator<Item = impl Into<String>>) -> eyre::Result<()> {
tracing::info!("running render"); 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() { for line in stdout.lines() {
tracing::trace!("render: {}", line); tracing::trace!("render: {}", line);