Skip to content

Commit

Permalink
🐛 Correctly escape table flags in pg_dump command
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Dec 8, 2021
1 parent fd5eb5e commit 2fbc139
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ func buildCommand() []string {
cmd = append(cmd, "--if-exists")
}
for _, table := range tables {
cmd = append(cmd, "--table="+table)
cmd = append(cmd, "--table='"+table+"'")
}
for _, table := range excludeTable {
cmd = append(cmd, "--exclude-table="+table)
cmd = append(cmd, "--exclude-table='"+table+"'")
}
for _, table := range excludeTableData {
cmd = append(cmd, "--exclude-table-data="+table)
cmd = append(cmd, "--exclude-table-data='"+table+"'")
}
if outputFormat == sqlformat.Custom {
cmd = append(cmd, "--format=c")
Expand Down

0 comments on commit 2fbc139

Please sign in to comment.