diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-11-02 19:36:56 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-11-02 19:36:56 +0530 |
commit | aba1d77f38da4a78d0049aff70b46ff0b7db25bf (patch) | |
tree | 9ee2f2040169b15594daa900129059c34fe71ee9 | |
parent | be1beb1a2d2c32aeb907b34d9d451b7a853c924d (diff) | |
download | rails-aba1d77f38da4a78d0049aff70b46ff0b7db25bf.tar.gz rails-aba1d77f38da4a78d0049aff70b46ff0b7db25bf.tar.bz2 rails-aba1d77f38da4a78d0049aff70b46ff0b7db25bf.zip |
Check first for git repository before using git branch
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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') |