lib/logsformyfamily.rb in logsformyfamily-0.2.1 vs lib/logsformyfamily.rb in logsformyfamily-0.2.2
- old
+ new
@@ -32,10 +32,10 @@
class Configuration
attr_accessor :version, :hostname, :app_name, :backends, :request_id
def initialize
- @version = `git rev-parse --short HEAD`.chomp
+ @version = `command -v git && git rev-parse --short HEAD`.chomp
@hostname = `hostname`.strip
@app_name = ENV['NEWRELIC_APP']
@backends = []
@request_id = proc { |env| env['core_app.request_id'] }
end