Skip to content

Commit

Permalink
Revert "Run git config instead of reading config file manually (#639
Browse files Browse the repository at this point in the history
)"

This reverts commit e8fe2bd.
  • Loading branch information
straight-shoota committed Sep 18, 2024
1 parent e8fe2bd commit d7ba0f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/resolvers/git.cr
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ module Shards
end

private def valid_repository?
capture("git config --get-regexp 'remote\\..+\\.mirror'").each_line.any?(&.==("true"))
File.each_line(File.join(local_path, "config")) do |line|
return true if line =~ /mirror\s*=\s*true/
end
false
end

private def origin_url
Expand Down

0 comments on commit d7ba0f9

Please sign in to comment.