mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-25 17:10:38 +00:00
Capture initdb's stdout/stderr, to avoid messing with log formatting.
Especially with --interactive.
This commit is contained in:
@@ -155,12 +155,14 @@ impl WalRedoProcess {
|
||||
Command::new("initdb")
|
||||
.args(&["-D", datadir.to_str().unwrap()])
|
||||
.arg("-N")
|
||||
.status(),
|
||||
.output(),
|
||||
)
|
||||
.expect("failed to execute initdb");
|
||||
|
||||
if !initdb.success() {
|
||||
panic!("initdb failed");
|
||||
if !initdb.status.success() {
|
||||
panic!("initdb failed: {}\nstderr:\n{}",
|
||||
std::str::from_utf8(&initdb.stdout).unwrap(),
|
||||
std::str::from_utf8(&initdb.stderr).unwrap());
|
||||
}
|
||||
|
||||
// Start postgres itself
|
||||
|
||||
Reference in New Issue
Block a user