Skip to content

Commit

Permalink
postgresql@11: fix ENV["CI"] usage.
Browse files Browse the repository at this point in the history
Part of #70493.
  • Loading branch information
MikeMcQuaid committed Feb 8, 2021
1 parent d198a00 commit 6613002
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,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

Expand Down Expand Up @@ -137,7 +139,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 opt_pkgshare.to_s, shell_output("#{bin}/pg_config --sharedir").chomp
assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --libdir").chomp
assert_equal opt_lib.to_s, shell_output("#{bin}/pg_config --pkglibdir").chomp
Expand Down

0 comments on commit 6613002

Please sign in to comment.