refactor: put the dry-run and quiet checks on Ctx
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user