diff options
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r-- | lib/bundler/shared_helpers.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index e4cbbba2ba..f9ac9a760a 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -344,9 +344,10 @@ module Bundler def resolve_path(path) expanded = File.expand_path(path) + return expanded unless File.respond_to?(:realpath) - if File.respond_to?(:realpath) - expanded = File.realpath(expanded) until expanded == File.realpath(expanded) + while File.exist?(expanded) && File.realpath(expanded) != expanded + expanded = File.realpath(expanded) end expanded |