Skip to content

Commit

Permalink
[rubygems/rubygems] Fix some failing Bundler tests with old Git.
Browse files Browse the repository at this point in the history
Use the `git branch --list` rather than the `git branch -l` for better
compatibility. Because the `git branch -l` is used to create a new branch in
Git version < 2.20.0.

rubygems/rubygems@eac5be7d06
  • Loading branch information
junaruga authored and hsbt committed Aug 31, 2021
1 parent 907fa88 commit 71f6711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/bundler/support/builders.rb
Expand Up @@ -554,7 +554,7 @@ def _build(options)
raise "You can't specify `master` as the branch" if branch == "master"
escaped_branch = Shellwords.shellescape(branch)

if @context.git("branch -l #{escaped_branch}", libpath).empty?
if @context.git("branch --list #{escaped_branch}", libpath).empty?
@context.git("branch #{escaped_branch}", libpath)
end

Expand Down

0 comments on commit 71f6711

Please sign in to comment.