Skip to content

Commit cefbf45

Browse files
committed
add shellescape to git
1 parent 11acb05 commit cefbf45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def ping(repo)
2020
def clone(repo, destination, branch: nil)
2121
with_ssh_key do |env|
2222
cli = [exe, 'clone', '--depth', '1']
23-
cli += ['--single-branch', '--branch', branch] if branch.present?
23+
cli += ['--single-branch', '--branch', ::Shellwords.escape(branch)] if branch.present?
2424
cli += [repo, destination]
2525
::ShellUtil.execute(*cli, env: env, timeout_sec: 300).success!
2626
end

0 commit comments

Comments
 (0)