mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
- 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
14 lines
279 B
Ruby
Vendored
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
|