brew-postgresql-upgrade-database: re-add strips.

These were mistakenly removed in https://github.com/Homebrew/homebrew-core/pull/39895.

Fixes https://github.com/Homebrew/homebrew-core/issues/40904
master
Mike McQuaid 2019-06-12 08:34:06 +01:00 committed by GitHub
parent f527a39abf
commit 6010b3a8d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -64,8 +64,8 @@ begin
sql_for_lc_collate = "SELECT setting FROM pg_settings WHERE name LIKE 'lc_collate';"
sql_for_lc_ctype = "SELECT setting FROM pg_settings WHERE name LIKE 'lc_ctype';"
lc_collate = Utils.popen_read("#{old_bin}/psql", "postgres", "-qtAX", "-U", ENV["USER"], "-c", sql_for_lc_collate)
lc_ctype = Utils.popen_read("#{old_bin}/psql", "postgres", "-qtAX", "-U", ENV["USER"], "-c", sql_for_lc_ctype)
lc_collate = Utils.popen_read("#{old_bin}/psql", "postgres", "-qtAX", "-U", ENV["USER"], "-c", sql_for_lc_collate).strip
lc_ctype = Utils.popen_read("#{old_bin}/psql", "postgres", "-qtAX", "-U", ENV["USER"], "-c", sql_for_lc_ctype).strip
initdb_args = []
initdb_args += ["--lc-collate", lc_collate] unless lc_collate.empty?
initdb_args += ["--lc-ctype", lc_ctype] unless lc_ctype.empty?