summaryrefslogtreecommitdiff
path: root/lib/bundler/build_metadata.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-04-01 20:36:59 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-04-28 19:08:49 +0900
commit678d58c8508ec46aa270e3c5d81fc09cd0fee175 (patch)
tree34cbc8bb12e609d7a73e35c513090264360ffb49 /lib/bundler/build_metadata.rb
parent479ba9a44b6beda1dce32842bcbc66b6f46a85a0 (diff)
Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5669
Diffstat (limited to 'lib/bundler/build_metadata.rb')
-rw-r--r--lib/bundler/build_metadata.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/build_metadata.rb b/lib/bundler/build_metadata.rb
index 0846e82e06..8bffb2fae7 100644
--- a/lib/bundler/build_metadata.rb
+++ b/lib/bundler/build_metadata.rb
@@ -27,7 +27,7 @@ module Bundler
# If Bundler has been installed without its .git directory and without a
# commit instance variable then we can't determine its commits SHA.
- git_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
+ git_dir = File.expand_path("../../../.git", __dir__)
if File.directory?(git_dir)
return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
end