diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-24 19:46:19 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-24 21:22:39 +0200 |
commit | c7532ced89bbc8ddc7296c56391c1c3cc981c54a (patch) | |
tree | 1b43595a9eb4d8641c113420192bd02c79014eb6 /lib | |
parent | 5978a88f337b21f7210c1452533251f9332594fe (diff) | |
download | bundler-c7532ced89bbc8ddc7296c56391c1c3cc981c54a.tar.gz |
Fix inconsistent lockfile orderconsistent_lockfiles
When Gemfile would specify path sources as relative paths starting with
"./", the lockfile would have inconsistent order on `bundle install` and
`bundle update`.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/source/path.rb | 7 |
1 files changed, 6 insertions, 1 deletions
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"] |