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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user