fix verbose flag for PHP wrapper scripts

The flag must come after the command.
This commit is contained in:
Sarah Hoffmann
2021-02-26 16:33:30 +01:00
parent dd03aeb966
commit c7f40e3cee
3 changed files with 29 additions and 21 deletions

View File

@@ -31,6 +31,8 @@ def execute_file(dsn, fname, ignore_errors=False, pre_code=None, post_code=None)
cmd = ['psql']
if not ignore_errors:
cmd.extend(('-v', 'ON_ERROR_STOP=1'))
if not LOG.isEnabledFor(logging.INFO):
cmd.append('--quiet')
proc = subprocess.Popen(cmd, env=get_pg_env(dsn), stdin=subprocess.PIPE)
if not LOG.isEnabledFor(logging.INFO):