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