0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/app/services/problem_check/landlock.rb
David Taylor 226adb08ea
DEV: Bump landlock, refactor, and add problem check (#42049)
- Bump landlock to 0.3
- Refactor `SafeExec` now that Landlock gem is always present (it's no
longer conditional in the Gemfile)
- Strip ENV even when landlock is unavailable (for more consistent
developer experience on macOS)
- Add problem check which alerts admins if a production instance is
running without landlock support
2026-07-27 13:51:16 +01:00

14 lines
279 B
Ruby
Vendored

# frozen_string_literal: true
require "discourse/safe_exec"
class ProblemCheck::Landlock < ProblemCheck
self.priority = "high"
def call
return no_problem if !Rails.env.production?
return no_problem if Discourse::SafeExec.landlock_supported?
problem
end
end