Skip to content
Browse files

Check first for git repository before using git branch

  • Loading branch information...
1 parent be1beb1 commit aba1d77f38da4a78d0049aff70b46ff0b7db25bf @lifo lifo committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/testing/performance.rb
View
2 activesupport/lib/active_support/testing/performance.rb
@@ -124,7 +124,7 @@ def record
def environment
unless defined? @env
- app = "#{$1}.#{$2}" if `git branch -v` =~ /^\* (\S+)\s+(\S+)/
+ app = "#{$1}.#{$2}" if File.directory?('.git') && `git branch -v` =~ /^\* (\S+)\s+(\S+)/
rails = Rails::VERSION::STRING
if File.directory?('vendor/rails/.git')

0 comments on commit aba1d77

Please sign in to comment.
Something went wrong with that request. Please try again.