We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11acb05 commit cefbf45Copy full SHA for cefbf45
lib/git.rb
@@ -20,7 +20,7 @@ def ping(repo)
20
def clone(repo, destination, branch: nil)
21
with_ssh_key do |env|
22
cli = [exe, 'clone', '--depth', '1']
23
- cli += ['--single-branch', '--branch', branch] if branch.present?
+ cli += ['--single-branch', '--branch', ::Shellwords.escape(branch)] if branch.present?
24
cli += [repo, destination]
25
::ShellUtil.execute(*cli, env: env, timeout_sec: 300).success!
26
end
0 commit comments