diff options
author | Mitch Tishmack <mitch.tishmack@gmail.com> | 2013-05-23 21:52:38 +0400 |
---|---|---|
committer | Mitch Tishmack <mitch.tishmack@gmail.com> | 2013-05-23 21:52:38 +0400 |
commit | 719f72315f6242a71d8b1fb3eeffc233034a9643 (patch) | |
tree | c7f93ff1e7aefdbbe92852f8706caf3c354f944f /config | |
parent | 2c947647be5e4876b725112235eb70c415d76161 (diff) |
Apparently the gitlab Travis install has no git user.
Hackily handle this with a begin block and return a default that matches current use.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 664ca5c784a..35118599dec 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -58,7 +58,11 @@ Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}" Settings.gitlab['support_email'] ||= Settings.gitlab.email_from Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url) Settings.gitlab['user'] ||= 'git' -Settings.gitlab['user_home'] ||= Etc.getpwnam(Settings.gitlab['user']).dir +Settings.gitlab['user_home'] ||= begin + Etc.getpwnam(Settings.gitlab['user']).dir +rescue ArgumentError # no user configured + '/home/' + Settings.gitlab['user'] +end Settings.gitlab['signup_enabled'] ||= false Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil? Settings.gitlab['default_projects_features'] ||= {} |