From d198a002b3ea2950bd04ae28490718303bc86eed Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 8 Feb 2021 11:45:42 +0000 Subject: [PATCH] postgresql@10: fix ENV["CI"] usage. Part of https://github.com/Homebrew/homebrew-core/issues/70493. --- Formula/postgresql@10.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Formula/postgresql@10.rb b/Formula/postgresql@10.rb index d20e26fdd87ed..16f31b72a18f4 100644 --- a/Formula/postgresql@10.rb +++ b/Formula/postgresql@10.rb @@ -87,10 +87,12 @@ def install end def post_install - return if ENV["CI"] - (var/"log").mkpath postgresql_datadir.mkpath + + # Don't initialize database, it clashes when testing other PostgreSQL versions. + return if ENV["HOMEBREW_GITHUB_ACTIONS"] + system "#{bin}/initdb", "--locale=C", "-E", "UTF-8", postgresql_datadir unless pg_version_exists? end @@ -147,7 +149,7 @@ def plist end test do - system "#{bin}/initdb", testpath/"test" unless ENV["CI"] + system "#{bin}/initdb", testpath/"test" unless ENV["HOMEBREW_GITHUB_ACTIONS"] assert_equal pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp assert_equal lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp assert_equal lib.to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp