Browse Source

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 6 years ago
parent
commit
9ef1df36a4
1 changed files with 1 additions and 1 deletions
  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.