summaryrefslogtreecommitdiff
path: root/lib/bundler/source/path.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/source/path.rb')
-rw-r--r--lib/bundler/source/path.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index f98f5155fb..e73e33d922 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -132,7 +132,11 @@ module Bundler
end
def expand(somepath)
- somepath.expand_path(root_path)
+ if Bundler.current_ruby.jruby? # TODO: Unify when https://github.com/rubygems/bundler/issues/7598 fixed upstream and all supported jrubies include the fix
+ somepath.expand_path(root_path).expand_path
+ else
+ somepath.expand_path(root_path)
+ end
rescue ArgumentError => e
Bundler.ui.debug(e)
raise PathError, "There was an error while trying to use the path " \