Silence git messages to stdout during app boot.

Caused this to be printed every time tests were run:

    git is /usr/bin/git
    /home/user/src/danbooru
This commit is contained in:
evazion 2016-12-03 20:09:58 -06:00
parent 01afc46f74
commit f8d5add0cc

View File

@ -24,7 +24,7 @@ module Danbooru
if File.exists?("#{config.root}/REVISION")
config.x.git_hash = File.read("#{config.root}/REVISION").strip
elsif system("type git && git rev-parse --show-toplevel")
elsif system("type git > /dev/null && git rev-parse --show-toplevel > /dev/null")
config.x.git_hash = %x(git rev-parse --short HEAD).strip
else
config.x.git_hash = nil