Skip to content

Commit 2d32048

Browse files
committed
Delete old symlinks to directories which were deleted in mxbuild
1 parent 4dbab1a commit 2d32048

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tool/jt.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,6 +1862,16 @@ def build_graalvm(*options)
18621862
rubies_dir = chruby_versions if File.directory?(chruby_versions)
18631863

18641864
if rubies_dir
1865+
Dir.glob(rubies_dir + "/*").each do |link|
1866+
if File.symlink?(link)
1867+
target = File.readlink(link)
1868+
unless File.exist?(target)
1869+
File.delete link
1870+
puts "Deleted old link: #{link} -> #{target}"
1871+
end
1872+
end
1873+
end
1874+
18651875
link_path = "#{rubies_dir}/#{name}"
18661876
File.delete link_path if File.exist? link_path
18671877
File.symlink dest_ruby, link_path

0 commit comments

Comments
 (0)