feat: finish postgres cli
Implemented basic wanted functionality for postgres subcommands. We currently assume that postgres is running in docker-compose project in a service named "postgresdb". This could be looked at and changed at some point in the future.
This commit is contained in:
@@ -7,7 +7,7 @@ use std::{
|
||||
ffi::OsStr,
|
||||
fs::{File, OpenOptions},
|
||||
path::PathBuf,
|
||||
process::Command,
|
||||
process::{Command, Stdio},
|
||||
};
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
@@ -47,6 +47,12 @@ impl DockerCommand {
|
||||
self.command.spawn()?.wait()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_stdout(mut self, stdio: Stdio) -> Result<()> {
|
||||
self.command.stdout(stdio);
|
||||
self.spawn_wait()?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn safe_create_file(path: PathBuf) -> Result<File, std::io::Error> {
|
||||
|
||||
Reference in New Issue
Block a user