We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 544f155 commit 46e242eCopy full SHA for 46e242e
coderd/database/dbtestutil/db.go
@@ -242,10 +242,11 @@ func PGDump(dbURL string) ([]byte, error) {
242
"PGCLIENTENCODING=UTF8",
243
"PGDATABASE=", // we should always specify the database name in the connection string
244
}
245
- var stdout bytes.Buffer
+ var stdout, stderr bytes.Buffer
246
cmd.Stdout = &stdout
247
+ cmd.Stderr = &stderr
248
if err := cmd.Run(); err != nil {
- return nil, xerrors.Errorf("exec pg_dump: %w", err)
249
+ return nil, xerrors.Errorf("exec pg_dump: %w\n%s", err, stderr.String())
250
251
return stdout.Bytes(), nil
252
0 commit comments