Skip to content

Commit

Permalink
Merge pull request #205851 from Homebrew/deno-binary-linkage
Browse files Browse the repository at this point in the history
deno: use brew-provided function for checking binary linkage
  • Loading branch information
BrewTestBot authored Jan 29, 2025
2 parents fa0993e + e887360 commit 1afcd83
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Formula/d/deno.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,9 @@ def install
generate_completions_from_executable(bin/"deno", "completions")
end

def check_binary_linkage(binary, library)
binary.dynamically_linked_libraries.any? do |dll|
next false unless dll.start_with?(HOMEBREW_PREFIX.to_s)

File.realpath(dll) == File.realpath(library)
end
end

test do
require "utils/linkage"

IO.popen("deno run -A -r https://fresh.deno.dev fresh-project", "r+") do |pipe|
pipe.puts "n"
pipe.puts "n"
Expand All @@ -170,7 +164,7 @@ def check_binary_linkage(binary, library)
]
end
linked_libraries.each do |library|
assert check_binary_linkage(bin/"deno", library),
assert Utils.binary_linked_to_library?(bin/"deno", library),
"No linkage with #{library.basename}! Cargo is likely using a vendored version."
end
end
Expand Down

0 comments on commit 1afcd83

Please sign in to comment.