diff options
author | Andre Arko <andre@arko.net> | 2010-04-03 00:36:38 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2010-04-03 00:36:38 -0700 |
commit | 025cc0afc4395866694c1addc3634aa25232f87f (patch) | |
tree | e51bff8afddbb015d730fb1a61c6e274e845d9b8 | |
parent | f03cc081e5d35d48cc97f9542b8ab8392b8fe11c (diff) | |
download | bundler-025cc0afc4395866694c1addc3634aa25232f87f.tar.gz |
Fix Gem::Specification#git_version for unloaded specs
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 9bd6679a1a..6174646f73 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -18,7 +18,7 @@ module Gem 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]}" |