refactor: put the dry-run and quiet checks on Ctx

This commit is contained in:
2026-09-09 12:32:55 +00:00
parent d9439253fd
commit b40dfe6124
10 changed files with 253 additions and 217 deletions

View File

@@ -4,7 +4,7 @@ use std::time::{Duration, Instant};
use anyhow::{Result, bail};
use super::shape::Kind;
use crate::cmd::{Cmd, PgIsReady, PgRestore, Ps, Psql};
use crate::cmd::{Cmd, PgIsReady, PgRestore, Psql};
use crate::ctx::Ctx;
use crate::project::Project;
@@ -26,7 +26,7 @@ impl Database {
let service = compose.postgres()?;
let (user, name) = compose.postgres_credentials(&service)?;
let listed = Ps::id_of(&service).capture(ctx)?;
let listed = ctx.compose().ps(&service).capture(ctx)?;
let mut ids = listed.lines().map(str::trim).filter(|id| !id.is_empty());
let container = match (ids.next(), ids.next()) {