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:
parent
be1beb1a2d
commit
aba1d77f38
1 changed files with 1 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue