lib/bootsnap/load_path_cache/store.rb in bootsnap-1.18.3 vs lib/bootsnap/load_path_cache/store.rb in bootsnap-1.18.4
- old
+ new
@@ -120,9 +120,11 @@
path = File.dirname(path)
end
stack.reverse_each do |dir|
Dir.mkdir(dir)
rescue SystemCallError
+ # Check for broken symlinks. Calling File.realpath will raise Errno::ENOENT if that is the case
+ File.realpath(dir) if File.symlink?(dir)
raise unless File.directory?(dir)
end
end
end
end