Skip to content

Commit

Permalink
psql: stop on error, use long flags
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Jan 5, 2024
1 parent 96eb3b3 commit bc5d9aa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ func NewConfiguration() (*Configuration, error) {
// invocation, and this function adds those that are always required.
func (cfg Configuration) ArgsForPsql(args ...string) []string {
common := []string{
"-qA", "-h", cfg.PgHostname, "-U", cfg.PgUsername, //NOTE: PGPASSWORD comes via inherited env variable
"-d", "postgres", //ensure that -d does not default to the app username
"--variable", "ON_ERROR_STOP=1",
"--quiet", "--no-align",
"--host", cfg.PgHostname,
"--username", cfg.PgUsername, //NOTE: PGPASSWORD comes via inherited env variable
"--dbname", "postgres", //ensure that -d does not default to the app username
}
return append(common, args...)
}

0 comments on commit bc5d9aa

Please sign in to comment.