From d453033b19c27640f95cc085d52398342e15472b Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Tue, 13 Sep 2016 14:01:29 +0200 Subject: [Path] Store lockfile paths relative to the root, not the gemfile path --- lib/bundler/source/path.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/bundler/source/path.rb') diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 69bb0c1af2..4250e55905 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -46,7 +46,7 @@ module Bundler def to_lock out = String.new("PATH\n") - out << " remote: #{relative_path}\n" + out << " remote: #{lockfile_path}\n" out << " glob: #{@glob}\n" unless @glob == DEFAULT_GLOB out << " specs:\n" end @@ -129,6 +129,11 @@ module Bundler "`#{somepath}`.\nThe error message was: #{e.message}." end + def lockfile_path + return path if path.absolute? + expand(path).relative_path_from(Bundler.root) + end + def app_cache_path(custom_path = nil) @app_cache_path ||= Bundler.app_cache(custom_path).join(app_cache_dirname) end -- cgit v1.2.1