Skip to content

Commit

Permalink
Run git config instead of reading config file manually (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Sep 6, 2024
1 parent 48b7295 commit e8fe2bd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/resolvers/git.cr
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,7 @@ module Shards
end

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

private def origin_url
Expand Down

0 comments on commit e8fe2bd

Please sign in to comment.