From c7532ced89bbc8ddc7296c56391c1c3cc981c54a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 24 Jul 2019 19:46:19 +0200 Subject: Fix inconsistent lockfile order When Gemfile would specify path sources as relative paths starting with "./", the lockfile would have inconsistent order on `bundle install` and `bundle update`. --- lib/bundler/source/path.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 05d4d78bb5..f98f5155fb 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -24,7 +24,12 @@ module Bundler if options["path"] @path = Pathname.new(options["path"]) - @path = expand(@path) unless @path.relative? + expanded_path = expand(@path) + @path = if @path.relative? + expanded_path.relative_path_from(root_path.expand_path) + else + expanded_path + end end @name = options["name"] -- cgit v1.2.1