diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-09 17:57:50 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-03-14 18:52:21 +0100 |
commit | 5f4ed556d849a3c34b81b964556cb1b0ba1fd587 (patch) | |
tree | 079c306c751870ce1e200b2d82b35de82b390a56 | |
parent | 309729f5bfde799aad6fb985d6239633de2cb450 (diff) | |
download | bundler-5f4ed556d849a3c34b81b964556cb1b0ba1fd587.tar.gz |
Fix `bundle info bundler` path
-rw-r--r-- | lib/bundler/cli/info.rb | 8 | ||||
-rw-r--r-- | spec/commands/info_spec.rb | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb index 6fd71597aa..61d4001c6f 100644 --- a/lib/bundler/cli/info.rb +++ b/lib/bundler/cli/info.rb @@ -39,7 +39,13 @@ module Bundler end def print_gem_path(spec) - Bundler.ui.info spec.full_gem_path + path = if spec.name == "bundler" + File.expand_path("../../../..", __FILE__) + else + spec.full_gem_path + end + + Bundler.ui.info path end def print_gem_info(spec) diff --git a/spec/commands/info_spec.rb b/spec/commands/info_spec.rb index b87249f28f..7d9e8d3094 100644 --- a/spec/commands/info_spec.rb +++ b/spec/commands/info_spec.rb @@ -31,7 +31,6 @@ RSpec.describe "bundle info" do end it "prints the path to the running bundler" do - skip "'bundle info bundler --path' currently prints a different (incorrect) path from the old alternative 'bundle show rails'" bundle "info bundler --path" expect(out).to eq(root.to_s) end |