Commit 36c2c354fc4829827960d202a070f8e7b87c9446

Authored by Jacob Vosmaer
1 parent 38f4b61a

Adapt use of Gitlab::Popen to new style

app/models/key.rb
@@ -53,7 +53,7 @@ class Key < ActiveRecord::Base @@ -53,7 +53,7 @@ class Key < ActiveRecord::Base
53 Tempfile.open('gitlab_key_file') do |file| 53 Tempfile.open('gitlab_key_file') do |file|
54 file.puts key 54 file.puts key
55 file.rewind 55 file.rewind
56 - cmd_output, cmd_status = popen("ssh-keygen -lf #{file.path}", '/tmp') 56 + cmd_output, cmd_status = popen(%W(ssh-keygen -lf #{file.path}), '/tmp')
57 end 57 end
58 58
59 if cmd_status.zero? 59 if cmd_status.zero?
lib/gitlab/satellite/satellite.rb
@@ -33,7 +33,7 @@ module Gitlab @@ -33,7 +33,7 @@ module Gitlab
33 end 33 end
34 34
35 def create 35 def create
36 - output, status = popen("git clone #{project.repository.path_to_repo} #{path}", 36 + output, status = popen(%W(git clone -- #{project.repository.path_to_repo} #{path}),
37 Gitlab.config.satellites.path) 37 Gitlab.config.satellites.path)
38 38
39 log("PID: #{project.id}: git clone #{project.repository.path_to_repo} #{path}") 39 log("PID: #{project.id}: git clone #{project.repository.path_to_repo} #{path}")