1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Check first for git repository before using git branch

This commit is contained in:
Pratik Naik 2008-11-02 19:36:56 +05:30
parent be1beb1a2d
commit aba1d77f38

View file

@ -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')