Permalink
Browse files

Fix Gem::Specification#git_version for unloaded specs

  • Loading branch information...
1 parent f03cc08 commit 025cc0afc4395866694c1addc3634aa25232f87f @indirect indirect committed Apr 3, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bundler/rubygems_ext.rb
@@ -18,7 +18,7 @@ def groups
end
def git_version
- if File.exist?(File.join(full_gem_path, ".git"))
+ if @loaded_from && File.exist?(File.join(full_gem_path, ".git"))
rev = Dir.chdir(full_gem_path){ `git rev-parse HEAD`.strip }
branch = full_gem_path.split("-")[3]
branch ? " #{branch}-#{rev[0...6]}" : " #{rev[0...6]}"

0 comments on commit 025cc0a

Please sign in to comment.