Skip to content

Commit 9172740

Browse files
committed
Omit config.release if git revision not available (i.e. in Docker)
1 parent aa70bd2 commit 9172740

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

config/initializers/sentry.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
config.before_send = lambda do |event, hint|
99
filter.filter(event.to_hash)
1010
end
11-
config.release = `git rev-parse --short HEAD`&.chomp("\n")
11+
git_rev = `git rev-parse --short HEAD`&.chomp("\n")
12+
config.release = git_rev if git_rev.present?
1213
end
1314
Sentry.configure_scope do |scope|
1415
scope.set_context('app', {

0 commit comments

Comments
 (0)