Permalink
Browse files

Avoid an error at boot time in dev

  • Loading branch information...
1 parent 96db6f6 commit c7e7a402f0aecd86f70270ea0bdf94ca49bcb967 @jamiecobbett jamiecobbett committed Jul 8, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 config/initializers/current_release_sha.rb
@@ -1,6 +1,6 @@
-revision = `cat #{Rails.root}/REVISION`.chomp
-if revision.blank?
- CURRENT_RELEASE_SHA = "development"
-else
+if File.exists?("#{Rails.root}/REVISION")
+ revision = `cat #{Rails.root}/REVISION`.chomp
CURRENT_RELEASE_SHA = revision[0..10] # Just get the short SHA
-end
+else
+ CURRENT_RELEASE_SHA = "development"
+end

0 comments on commit c7e7a40

Please sign in to comment.