소스 검색

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 년 전
부모
커밋
9ef1df36a4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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.