Skip to content

Commit

Permalink
Merge pull request #16966 from cho-m/keg-postgresql-mkpath
Browse files Browse the repository at this point in the history
keg: mkpath while linking `{include,lib,share}/postgresql@X`
  • Loading branch information
MikeMcQuaid committed Mar 29, 2024
2 parents ec74bad + babb352 commit 4501e38
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Library/Homebrew/keg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,14 @@ def link(verbose: false, dry_run: false, overwrite: false)
link_dir("etc", verbose:, dry_run:, overwrite:) { :mkpath }
link_dir("bin", verbose:, dry_run:, overwrite:) { :skip_dir }
link_dir("sbin", verbose:, dry_run:, overwrite:) { :skip_dir }
link_dir("include", verbose:, dry_run:, overwrite:) { :link }
link_dir("include", verbose:, dry_run:, overwrite:) do |relative_path|
case relative_path.to_s
when %r{^postgresql@\d+/}
:mkpath
else
:link
end
end

link_dir("share", verbose:, dry_run:, overwrite:) do |relative_path|
case relative_path.to_s
Expand All @@ -429,6 +436,7 @@ def link(verbose: false, dry_run: false, overwrite: false)
/^fish/,
%r{^lua/}, # Lua, Lua51, Lua53 all need the same handling.
%r{^guile/},
%r{^postgresql@\d+/},
*SHARE_PATHS
:mkpath
else
Expand All @@ -452,6 +460,7 @@ def link(verbose: false, dry_run: false, overwrite: false)
/^ocaml/,
/^perl5/,
"php",
%r{^postgresql@\d+/},
/^python[23]\.\d+/,
/^R/,
/^ruby/
Expand Down

0 comments on commit 4501e38

Please sign in to comment.