diff options
Diffstat (limited to 'lib/bundler/build_metadata.rb')
-rw-r--r-- | lib/bundler/build_metadata.rb | 2 |
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 |