From aba1d77f38da4a78d0049aff70b46ff0b7db25bf Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 2 Nov 2008 19:36:56 +0530 Subject: [PATCH] Check first for git repository before using git branch --- activesupport/lib/active_support/testing/performance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index f996c40793..bd136c2596 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -124,7 +124,7 @@ module ActiveSupport 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')