Skip to content

Commit 5c8a0d3

Browse files
jhheidermxcl
authored andcommitted
avoid setting duplicate rpaths
1 parent 282a022 commit 5c8a0d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

share/brewkit/fix-machos.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ def fix_rpaths
136136
@file.rpaths.each do |rpath|
137137
if rpath.start_with? $tea_prefix
138138
diff = Pathname.new(rpath).relative_path_from(Pathname.new(@file.filename).parent)
139-
@file.change_rpath rpath, "@loader_path/#{diff}"
139+
if @file.rpaths.include? diff
140+
@file.delete_rpath rpath
141+
else
142+
@file.change_rpath rpath, "@loader_path/#{diff}"
143+
end
140144
dirty = true
141145
end
142146
end

0 commit comments

Comments
 (0)