Commit bad18a7918b2bb3674eb72943ff82a913e5fb5ae
1 parent
0a4185e8
Exists in
master
and in
17 other branches
Noosfero::VERSION: don't blow up if git is not installed
This will happen when working from a git repository, but actually running Noosfero from a choot, container or virtual machine that does not have git installed on it.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/noosfero/version.rb
@@ -5,7 +5,7 @@ end | @@ -5,7 +5,7 @@ end | ||
5 | 5 | ||
6 | root = File.expand_path(File.dirname(__FILE__) + '/../..') | 6 | root = File.expand_path(File.dirname(__FILE__) + '/../..') |
7 | if File.exist?(File.join(root, '.git')) | 7 | if File.exist?(File.join(root, '.git')) |
8 | - git_version = Dir.chdir(root) { `git describe --tags`.strip.sub('-rc', '~rc') } | 8 | + git_version = Dir.chdir(root) { `git describe --tags`.to_s.strip.sub('-rc', '~rc') } |
9 | if git_version > Noosfero::VERSION | 9 | if git_version > Noosfero::VERSION |
10 | Noosfero::VERSION.clear << git_version | 10 | Noosfero::VERSION.clear << git_version |
11 | end | 11 | end |