Commit 719f72315f6242a71d8b1fb3eeffc233034a9643

Authored by Mitch Tishmack
1 parent 2c947647

Apparently the gitlab Travis install has no git user.

Hackily handle this with a begin block and return a default that matches current use.
Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
config/initializers/1_settings.rb
@@ -58,7 +58,11 @@ Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}" @@ -58,7 +58,11 @@ Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
58 Settings.gitlab['support_email'] ||= Settings.gitlab.email_from 58 Settings.gitlab['support_email'] ||= Settings.gitlab.email_from
59 Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url) 59 Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
60 Settings.gitlab['user'] ||= 'git' 60 Settings.gitlab['user'] ||= 'git'
61 -Settings.gitlab['user_home'] ||= Etc.getpwnam(Settings.gitlab['user']).dir 61 +Settings.gitlab['user_home'] ||= begin
  62 + Etc.getpwnam(Settings.gitlab['user']).dir
  63 +rescue ArgumentError # no user configured
  64 + '/home/' + Settings.gitlab['user']
  65 +end
62 Settings.gitlab['signup_enabled'] ||= false 66 Settings.gitlab['signup_enabled'] ||= false
63 Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil? 67 Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil?
64 Settings.gitlab['default_projects_features'] ||= {} 68 Settings.gitlab['default_projects_features'] ||= {}