Skip to content

Commit 7f21411

Browse files
author
root
committed
Use env instead of export (bash only)
1 parent d543279 commit 7f21411

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/controllers/smart_http_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def internal_send_file(requested_file, content_type)
325325

326326
## Note: command must be terminated with a quote!
327327
def git_command(command)
328-
return "#{run_git_prefix} && export GL_BYPASS_UPDATE_HOOK=true && git #{command}'"
328+
return "#{run_git_prefix} && env GL_BYPASS_UPDATE_HOOK=true git #{command}'"
329329
end
330330

331331

app/models/repository_mirror.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def push
5050
push_args << " \"#{dequote(explicit_refspec)}\"" unless explicit_refspec.blank?
5151

5252
begin
53-
push_message = RedmineGitolite::GitHosting.execute_command(:shell_cmd, "bash", :pipe_data => 'export GIT_SSH=~/.ssh/run_gitolite_admin_ssh && cd ' + "#{repository.gitolite_repository_path}" + ' && git push ' + "#{push_args}", :pipe_command => 'echo').chomp
53+
push_message = RedmineGitolite::GitHosting.execute_command(:shell_cmd, "bash", :pipe_data => 'cd ' + "#{repository.gitolite_repository_path}" + ' && env GIT_SSH=~/.ssh/run_gitolite_admin_ssh git push ' + "#{push_args}", :pipe_command => 'echo').chomp
5454
push_failed = false
5555
rescue RedmineGitolite::GitHosting::GitHostingException => e
5656
push_message = e.output

0 commit comments

Comments
 (0)