change user only when root

This commit is contained in:
Pete Matsyburka
2026-02-20 22:25:12 +02:00
parent fb5e13ee4c
commit b6635fcc4f
+1 -1
View File
@@ -60,7 +60,7 @@ if ENV['RAILS_ENV'] == 'production'
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].to_s.empty? ? database_url : ENV.fetch('DATABASE_URL', nil)
end
unless Process.euid == 2000
if Process.uid.zero?
begin
test_file = "#{ENV.fetch('WORKDIR', '.')}/test"