Skip to content

Commit 500820d

Browse files
committed
fixup: include new homebrew directories
1 parent 4db34a7 commit 500820d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/package/macos.ex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,12 @@ defmodule Desktop.Deployment.Package.MacOS do
312312
|> Enum.filter(&is_binary/1)
313313
end
314314

315-
@prefixes ["/opt/homebrew/", "/usr/local/opt/", "/Users/"]
315+
def import_prefixes() do
316+
["/opt/homebrew/", "/usr/local/opt/", "/Users/"]
317+
end
318+
316319
defp should_rewrite?(bin, dep) do
317-
Enum.any?(@prefixes, &String.starts_with?(dep, &1)) or
320+
Enum.any?(import_prefixes(), &String.starts_with?(dep, &1)) or
318321
(String.starts_with?(dep, "@executable_path") and
319322
not File.exists?(
320323
Path.join(

lib/tooling.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ defmodule Desktop.Deployment.Tooling do
168168

169169
Package.MacOS.find_deps(object)
170170
|> Enum.filter(fn lib ->
171-
(String.starts_with?(lib, "/usr/local/opt/") or String.starts_with?(lib, "/Users/")) and
171+
Enum.any?(Package.MacOS.import_prefixes(), &String.starts_with?(lib, &1)) and
172172
not String.starts_with?(lib, cwd)
173173
end)
174174
end

0 commit comments

Comments
 (0)