diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-02 15:39:34 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-02 15:39:34 -0300 |
commit | f927767919e8d7079043d637d2177b554126ad6c (patch) | |
tree | 505b7368ca0af856f3109435417d9b88c3bd95ef | |
parent | 0f1b0c0b60ef7b56bbccacd4307fdda8afa1a59b (diff) | |
download | postgresql-f927767919e8d7079043d637d2177b554126ad6c.tar.gz postgresql-f927767919e8d7079043d637d2177b554126ad6c.zip |
Use native path separators to pg_ctl in initdb
On Windows, CMD.EXE allegedly does not run a command that uses forward slashes,
so let's convert the path to use backslashes instead.
Backpatch to 10.
Author: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Reviewed-by: Juan José SantamarÃa Flecha <juanjo.santamaria@gmail.com>
Discussion: https://postgr.es/m/CAMm1aWaNDuaPYFYMAqDeJrZmPtNvLcJRS++CcZWY8LT6KcoBZw@mail.gmail.com
-rw-r--r-- | src/bin/initdb/initdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 81568218167..2da587c3766 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -3350,6 +3350,9 @@ main(int argc, char *argv[]) /* ... and tag on pg_ctl instead */ join_path_components(pg_ctl_path, pg_ctl_path, "pg_ctl"); + /* Convert the path to use native separators */ + make_native_path(pg_ctl_path); + /* path to pg_ctl, properly quoted */ appendShellString(start_db_cmd, pg_ctl_path); |