Skip to content
Snippets Groups Projects
Commit 1361c796 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Set HOME for the GitLab user in wrapper script

Whenever we `bundle exec` a command as the GitLab user, set the HOME
environment variable accordingly. This is the moral equivalent of the
`-H` in `sudo -u git -H bundle exec ...`.
parent 642608b3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -9,5 +9,7 @@ fi
 
gitlab_user=$(ls -lLd <%= install_dir %>/embedded/service/gitlab-rails/log | awk '{ print $3 }')
 
export HOME=$(eval echo ~${gitlab_user})
cd <%= install_dir %>/embedded/service/gitlab-rails
exec <%= install_dir %>/embedded/bin/chpst -u $gitlab_user -U $gitlab_user <%= install_dir %>/embedded/bin/bundle exec <%= command %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment