From 0780d0601587f8258d6606b17b4125ee0c787f45 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 11 Jul 2022 10:10:38 +0800 Subject: [PATCH] keg: create subdirectories of `lib/lua` instead of symlinks Some formulae (e.g. `luv`) have a `lib/lua/5.1` subdirectory inside their keg. Before this change, the `5.1` subdirectory is symlinked into `HOMEBREW_PREFIX`. This can result in `luarocks` installing things into a formula's keg, which we don't want. Let's fix that by making sure that `brew link` creates these subdirectories instead of symlinking them. We already do this for subdirectories of `share/lua`: https://github.com/Homebrew/brew/blob/8dd96ae8bacb4f7eb3ef476af63470e3702aee35/Library/Homebrew/keg.rb#L430 --- Library/Homebrew/keg.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index e4fa51a0ee..c0ef58fc89 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -446,7 +446,7 @@ class Keg /^gdk-pixbuf/, "ghc", /^gio/, - "lua", + /^lua/, /^mecab/, /^node/, /^ocaml/,