brew-postgresql-upgrade-database: brew style --fix.

This commit is contained in:
Mike McQuaid 2019-10-15 08:59:55 +01:00
parent 11ec1594b4
commit b038c78b26
No known key found for this signature in database
GPG key ID: 48A898132FD8EE70

View file

@ -49,7 +49,7 @@ begin
# https://www.postgresql.org/docs/10/static/pgupgrade.html
ohai "Upgrading #{name} data from #{pg_version_data} to #{pg_version_installed}..."
if /#{name}\s+started/ =~ Utils.popen_read("brew", "services", "list")
if /#{name}\s+started/.match?(Utils.popen_read("brew", "services", "list"))
system "brew", "services", "stop", name
service_stopped = true
elsif quiet_system "#{bin}/pg_ctl", "-D", datadir, "status"