mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
15 lines
326 B
Ruby
15 lines
326 B
Ruby
# typed: strict
|
|
# frozen_string_literal: true
|
|
|
|
require_relative "directory"
|
|
|
|
module UnpackStrategy
|
|
# Strategy for unpacking Git repositories.
|
|
class Git < Directory
|
|
sig { override.params(path: Pathname).returns(T::Boolean) }
|
|
def self.can_extract?(path)
|
|
!!(super && (path/".git").directory?)
|
|
end
|
|
end
|
|
end
|