From babb352aef8fb99d7df62008947c125930f6f49b Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 28 Mar 2024 17:26:58 -0400 Subject: [PATCH] keg: mkpath while linking `{include,lib,share}/postgresql@X` Signed-off-by: Michael Cho --- Library/Homebrew/keg.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 98256534659c8..4e5015c9babf5 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -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 @@ -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 @@ -452,6 +460,7 @@ def link(verbose: false, dry_run: false, overwrite: false) /^ocaml/, /^perl5/, "php", + %r{^postgresql@\d+/}, /^python[23]\.\d+/, /^R/, /^ruby/