diff options
author | Ry Biesemeyer <ry.biesemeyer@elastic.co> | 2021-12-02 16:09:36 +0000 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-27 05:20:58 +0000 |
commit | bece8808744ee178a4c55c6954edd30fb93b9ad3 (patch) | |
tree | 32cc1edd33a6f08a7ffb27a1559a5348e022359f /lib/bundler/definition.rb | |
parent | a812f1fed0e6e184447ca00b713d54b25be05911 (diff) |
[rubygems/rubygems] Centralize logic using `Pathname#relative_path_from`
To avoid potential crashes when trying to jump from a drive to another
on Windows, and take the change refactor things a bit.
https://github.com/rubygems/rubygems/commit/7c9a9a431a
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r-- | lib/bundler/definition.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 564530a98c..3c18ce7139 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -405,13 +405,13 @@ module Bundler msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any? msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any? msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any? - msg << "\n\nRun `bundle install` elsewhere and add the updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control.\n" + msg << "\n\nRun `bundle install` elsewhere and add the updated #{SharedHelpers.relative_gemfile_path} to version control.\n" unless explicit_flag suggested_command = unless Bundler.settings.locations("frozen").keys.include?(:env) "bundle config set frozen false" end - msg << "If this is a development machine, remove the #{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)} " \ + msg << "If this is a development machine, remove the #{SharedHelpers.relative_lockfile_path} " \ "freeze by running `#{suggested_command}`." if suggested_command end |