diff --git a/salt/modules/postgres.py b/salt/modules/postgres.py index d9664ac840a..85656cc2612 100644 --- a/salt/modules/postgres.py +++ b/salt/modules/postgres.py @@ -269,7 +269,7 @@ def _run_initdb( "postgres.timeout", default=_DEFAULT_COMMAND_TIMEOUT_SECS ), ) - cmdstr = " ".join([shlex.quote(c) for c in cmd]) + cmdstr = shlex.join(cmd) ret = __salt__["cmd.run_all"](cmdstr, python_shell=False, **kwargs) if ret.get("retcode", 0) != 0: