Skip to content

Commit

Permalink
postgresql@9.6: 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 bbb7de8 commit c198b83
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Formula/postgresql@9.6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +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"]

postgresql_datadir.mkpath
system "#{bin}/initdb", postgresql_datadir unless pg_version_exists?
end
Expand Down Expand Up @@ -149,7 +152,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
Expand Down

0 comments on commit c198b83

Please sign in to comment.