Merge pull request #16002 from samford/update-xcodebuild-type-signature
Formula, BuildError: Update type signatures
This commit is contained in:
commit
fe07ced056
@ -479,7 +479,7 @@ class BuildError < RuntimeError
|
|||||||
params(
|
params(
|
||||||
formula: T.nilable(Formula),
|
formula: T.nilable(Formula),
|
||||||
cmd: T.any(String, Pathname),
|
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],
|
env: T::Hash[String, T.untyped],
|
||||||
).void
|
).void
|
||||||
}
|
}
|
||||||
|
@ -2629,7 +2629,7 @@ class Formula
|
|||||||
#
|
#
|
||||||
# # If there is a "make install" available, please use it!
|
# # If there is a "make install" available, please use it!
|
||||||
# system "make", "install"</pre>
|
# 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)
|
def system(cmd, *args)
|
||||||
verbose_using_dots = Homebrew::EnvConfig.verbose_using_dots?
|
verbose_using_dots = Homebrew::EnvConfig.verbose_using_dots?
|
||||||
|
|
||||||
@ -2794,7 +2794,7 @@ class Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Runs `xcodebuild` without Homebrew's compiler environment variables set.
|
# 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)
|
def xcodebuild(*args)
|
||||||
removed = ENV.remove_cc_etc
|
removed = ENV.remove_cc_etc
|
||||||
|
|
||||||
|
@ -141,11 +141,11 @@ describe "Exception" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe BuildError do
|
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") }
|
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
|
end
|
||||||
|
|
||||||
describe OperationInProgressError do
|
describe OperationInProgressError do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user