diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-24 19:46:19 +0200 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2019-08-16 14:30:23 +0900 |
commit | 6711343d5a630cc857f0fa503b403edb68415f48 (patch) | |
tree | 68a06e460c067a5173b4063879bb0db0400d3d8d /lib/bundler/source/path.rb | |
parent | c11c8b69ea98e698e855b4b1f122a54929582dc7 (diff) | |
download | ruby-6711343d5a630cc857f0fa503b403edb68415f48.tar.gz |
[bundler/bundler] 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`.
https://github.com/bundler/bundler/commit/c7532ced89
Diffstat (limited to 'lib/bundler/source/path.rb')
-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"] |