formula_assertions: Fix pipe_output type sig

```
❯ brew test zstd
==> Testing zstd
Error: zstd: failed
An exception occurred within a child process:
  TypeError: Parameter 'cmd': Expected type String, got type Pathname with value #<Pathname:/opt/homebrew/Cellar/zstd/1.5.6/bin/zstd>
Caller: /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/z/zstd.rb:58
Definition: /opt/homebrew/Library/Homebrew/formula_assertions.rb:40 (Homebrew::Assertions#pipe_output)
```
This commit is contained in:
Issy Long 2024-07-16 22:07:31 -04:00
parent 9538f424b5
commit 5ab32eeadb
No known key found for this signature in database

View File

@ -36,7 +36,7 @@ module Homebrew
# optionally asserts the exit status. # optionally asserts the exit status.
# #
# @api public # @api public
sig { params(cmd: String, input: T.nilable(String), result: T.nilable(Integer)).returns(String) } sig { params(cmd: T.any(String, Pathname), input: T.nilable(String), result: T.nilable(Integer)).returns(String) }
def pipe_output(cmd, input = nil, result = nil) def pipe_output(cmd, input = nil, result = nil)
ohai cmd ohai cmd
output = IO.popen(cmd, "w+") do |pipe| output = IO.popen(cmd, "w+") do |pipe|