mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-17 16:34:44 -05:00
posix=False in shlex.split() never strips quote characters, so any Windows hook path quoted to handle spaces (or any quoted argument) came out with literal quotes still attached, and unquoted spaced paths were split into multiple argv elements either way. Use a shlex.shlex instance with posix=True (correct quote-stripping) and escape='' (so backslashes in Windows paths are not treated as escape characters). Document the quoting requirement in config.py and add regression tests for quoted/unquoted spaced paths.