Skip to content

Commit f7723d1

Browse files
committed
Fixed installation of Gitolite3 hooks via moving .chomp into RedmineGitHosting::Commands.sudo_gitolite_query_rc so that gitolite_local_code_dir also chomped
(it was generating path like this "/var/lib/git/local\n/hooks/common/post-receive")
1 parent 7186cd6 commit f7723d1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: lib/redmine_git_hosting/commands/gitolite.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def gitolite_infos
1717

1818
def sudo_gitolite_query_rc(param)
1919
begin
20-
sudo_capture('gitolite', 'query-rc', param)
20+
sudo_capture('gitolite', 'query-rc', param).try(:chomp)
2121
rescue RedmineGitHosting::Error::GitoliteCommandException => e
2222
logger.error("Can't retrieve Gitolite param : #{e.output}")
2323
nil

Diff for: lib/redmine_git_hosting/config/gitolite_base.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ def gitolite_home_dir
2929

3030

3131
def gitolite_bin_dir
32-
@gitolite_bin_dir ||= RedmineGitHosting::Commands.sudo_gitolite_query_rc('GL_BINDIR').try(:chomp)
32+
@gitolite_bin_dir ||= RedmineGitHosting::Commands.sudo_gitolite_query_rc('GL_BINDIR')
3333
end
3434

3535

3636
def gitolite_lib_dir
37-
@gitolite_lib_dir ||= RedmineGitHosting::Commands.sudo_gitolite_query_rc('GL_LIBDIR').try(:chomp)
37+
@gitolite_lib_dir ||= RedmineGitHosting::Commands.sudo_gitolite_query_rc('GL_LIBDIR')
3838
end
3939

4040

0 commit comments

Comments
 (0)