From cd507c3d34b62577e284085635c15d9724e067bc Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 8 Jul 2020 16:59:08 +0200 Subject: [PATCH] Handle non-existent load path entries --- lib/bootsnap/load_path_cache/path_scanner.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bootsnap/load_path_cache/path_scanner.rb b/lib/bootsnap/load_path_cache/path_scanner.rb index ee278419..7a7eacbf 100644 --- a/lib/bootsnap/load_path_cache/path_scanner.rb +++ b/lib/bootsnap/load_path_cache/path_scanner.rb @@ -18,6 +18,7 @@ module PathScanner class << self def call(path) path = File.expand_path(path.to_s).freeze + return [[], []] unless File.directory?(path) # If the bundle path is a descendent of this path, we do additional # checks to prevent recursing into the bundle path as we recurse