diff options
author | Andre Arko <andre@arko.net> | 2018-07-09 22:50:45 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2018-07-09 22:50:45 -0700 |
commit | 865ec52ae87c29473405ce587977dd3eaef453ae (patch) | |
tree | ff2187e4c7db07bd5da70b86f15c8dd3211844df /lib/bundler/shared_helpers.rb | |
parent | 8779946b56c33d45855350482c00c828825d667d (diff) | |
download | bundler-865ec52ae87c29473405ce587977dd3eaef453ae.tar.gz |
only realpath things that exist
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 |