Skip to content

Commit 44866bb

Browse files
committed
Clean up the fall-back from /etc/os-release to /usr/lib/os-release
1 parent de55584 commit 44866bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/sentry_os.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,10 @@ sentry__get_os_context(void)
348348
if (sentry_value_is_null(os_dist)) {
349349
os_dist = get_linux_os_release("/usr/lib/os-release");
350350
if (sentry_value_is_null(os_dist)) {
351-
sentry_value_set_by_key(os, "distribution", os_dist);
351+
return os;
352352
}
353-
} else {
354-
sentry_value_set_by_key(os, "distribution", os_dist);
355353
}
354+
sentry_value_set_by_key(os, "distribution", os_dist);
356355
# endif // defined(SENTRY_PLATFORM_LINUX)
357356

358357
return os;

0 commit comments

Comments
 (0)