Skip to content

Commit 20aca5f

Browse files
committed
Delete only broken links prefixed with truffleruby- pointing to mxbuild
1 parent 94bb275 commit 20aca5f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tool/jt.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,14 +1860,14 @@ def build_graalvm(*options)
18601860
rubies_dir = chruby_versions if File.directory?(chruby_versions)
18611861

18621862
if rubies_dir
1863-
Dir.glob(rubies_dir + "/*").each do |link|
1864-
if File.symlink?(link)
1865-
target = File.readlink(link)
1866-
unless File.exist?(target)
1867-
File.delete link
1868-
puts "Deleted old link: #{link} -> #{target}"
1869-
end
1870-
end
1863+
Dir.glob(rubies_dir + "/truffleruby-*").each do |link|
1864+
next unless File.symlink?(link)
1865+
next if File.exist?(link)
1866+
target = File.readlink(link)
1867+
next unless target.start_with?("#{TRUFFLERUBY_DIR}/mxbuild")
1868+
1869+
File.delete link
1870+
puts "Deleted old link: #{link} -> #{target}"
18711871
end
18721872

18731873
link_path = "#{rubies_dir}/#{name}"

0 commit comments

Comments
 (0)