Skip to content

Commit

Permalink
-b option of git init only appeared in git 2.28
Browse files Browse the repository at this point in the history
  • Loading branch information
lacostej committed May 18, 2022
1 parent 3bca985 commit b9769ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fastlane/spec/actions_specs/import_from_git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
source_directory_path = Dir.mktmpdir("fl_spec_import_from_git_source")

Dir.chdir(source_directory_path) do
`git init -b master`
if Gem::Version.new(`git --version`.strip.split(' ').last) >= Gem::Version.new("2.28.0")
`git init -b master`
else
`git init`
end
`git config user.email "you@example.com"`
`git config user.name "Your Name"`

Expand Down

0 comments on commit b9769ab

Please sign in to comment.