Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formula, BuildError: Update type signatures #16002

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ class BuildError < RuntimeError
params(
formula: T.nilable(Formula),
cmd: T.any(String, Pathname),
args: T::Array[T.any(String, Pathname, Integer)],
args: T::Array[T.any(String, Integer, Pathname, Symbol)],
env: T::Hash[String, T.untyped],
).void
}
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2629,7 +2629,7 @@ def undeclared_runtime_dependencies
#
# # If there is a "make install" available, please use it!
# system "make", "install"</pre>
sig { params(cmd: T.any(String, Pathname), args: T.any(String, Pathname, Integer)).void }
sig { params(cmd: T.any(String, Pathname), args: T.any(String, Integer, Pathname, Symbol)).void }
def system(cmd, *args)
verbose_using_dots = Homebrew::EnvConfig.verbose_using_dots?

Expand Down Expand Up @@ -2794,7 +2794,7 @@ def mkdir(name, &block)
end

# Runs `xcodebuild` without Homebrew's compiler environment variables set.
sig { params(args: T.any(String, Pathname)).void }
sig { params(args: T.any(String, Integer, Pathname, Symbol)).void }
def xcodebuild(*args)
removed = ENV.remove_cc_etc

Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/test/exceptions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ class Baz < Formula; end
end

describe BuildError do
subject { described_class.new(formula, "badprg", %w[arg1 arg2], {}) }
subject { described_class.new(formula, "badprg", ["arg1", 2, Pathname.new("arg3"), :arg4], {}) }

let(:formula) { instance_double(Formula, name: "foo") }

its(:to_s) { is_expected.to eq("Failed executing: badprg arg1 arg2") }
its(:to_s) { is_expected.to eq("Failed executing: badprg arg1 2 arg3 arg4") }
end

describe OperationInProgressError do
Expand Down