Skip to content

Commit 6e14a5c

Browse files
Merge pull request #441 from Sgoettschkes/issue/440
Not reading dsn config at compile time
2 parents 944eb21 + b691c56 commit 6e14a5c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/sentry/config.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ defmodule Sentry.Config do
7979

8080
@deprecated "Use root_source_code_paths/0 instead"
8181
def root_source_code_path do
82-
path = get_config(:root_source_code_path)
82+
path = get_config(:root_source_code_path, check_dsn: false)
8383

8484
if path do
8585
path
@@ -97,8 +97,8 @@ defmodule Sentry.Config do
9797
# We should deprecate this the :root_source_code_path completely in the next major
9898
# release.
9999
def root_source_code_paths do
100-
paths = get_config(:root_source_code_paths)
101-
path = get_config(:root_source_code_path)
100+
paths = get_config(:root_source_code_paths, check_dsn: false)
101+
path = get_config(:root_source_code_path, check_dsn: false)
102102

103103
cond do
104104
not is_nil(path) and not is_nil(paths) ->

test/config_test.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,11 @@ defmodule Sentry.ConfigTest do
113113

114114
assert Config.root_source_code_paths() == ["/test"]
115115
end
116+
117+
test "call to :root_source_code_paths does not read dsn env" do
118+
modify_env(:sentry, dsn: {:system, "DSN", required: true})
119+
120+
Config.root_source_code_paths()
121+
end
116122
end
117123
end

0 commit comments

Comments
 (0)