Explorar el Código

Not not initialize bootsnap when running as root

Fixes the bootsnap cache not being readable and writeable by the huginn
user afterwards.

In situations where during the manual installation upgrade process `sudo
bundle exec rake:production:*` was run before running a rake task as the
huginn user the bootsnap cache directory was propagated by the root user
which then causes exceptions when running any command as the huginn
user.

 #2315
Dominik Sander hace 6 años
padre
commit
9ef1df36a4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      config/boot.rb

+ 1 - 1
config/boot.rb

@@ -4,4 +4,4 @@ require 'rubygems'
 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
 
 require 'bundler/setup' # Set up gems listed in the Gemfile.
-require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
+require 'bootsnap/setup' if Process.euid != 0 # Speed up boot time by caching expensive operations.