Fix type errors

This commit is contained in:
Douglas Eichelberger 2023-03-06 15:00:50 -08:00
parent d56e2884aa
commit 1c44a8861d
2 changed files with 28 additions and 30 deletions

View File

@ -105,8 +105,6 @@ module Homebrew
arguments.concat UNBREWED_EXCLUDE_PATHS.flat_map { |d| %W[! -path #{d}] }
arguments.push ")"
# This is a false positive type error: https://github.com/sorbet/sorbet/issues/6812
T.unsafe(self).cd HOMEBREW_PREFIX
safe_system "find", *arguments
cd(HOMEBREW_PREFIX) { safe_system("find", *arguments) }
end
end

View File

@ -54,8 +54,7 @@ module Homebrew
end
def git_log(cd_dir, path = nil, tap = nil, args:)
# This is a false positive type error: https://github.com/sorbet/sorbet/issues/6812
T.unsafe(self).cd cd_dir
cd cd_dir do
repo = Utils.popen_read("git", "rev-parse", "--show-toplevel").chomp
if tap
name = tap.to_s
@ -84,4 +83,5 @@ module Homebrew
git_args += ["--follow", "--", path] if path.present?
system "git", "log", *git_args
end
end
end