File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments