formula_assertions: Fix type of cmd
param in shell_output
- This can be either a String or a Pathname, per the part of the `noseyparker` test that failed (in a different part of the test, the command is passed as a string). ``` ==> Testing noseyparker ==> /opt/homebrew/Cellar/noseyparker/0.18.1/bin/noseyparker -V Error: noseyparker: failed An exception occurred within a child process: TypeError: Parameter 'cmd': Expected type String, got type Pathname with value #<Pathname:/opt/homebrew/Ce...ps://github.com/Homebrew/brew> Caller: /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/n/noseyparker.rb:35 ```
This commit is contained in:
parent
868c3dc9cd
commit
ecdd45e73e
@ -21,7 +21,7 @@ module Homebrew
|
||||
# Returns the output of running cmd and asserts the exit status.
|
||||
#
|
||||
# @api public
|
||||
sig { params(cmd: String, result: Integer).returns(String) }
|
||||
sig { params(cmd: T.any(Pathname, String), result: Integer).returns(String) }
|
||||
def shell_output(cmd, result = 0)
|
||||
ohai cmd
|
||||
output = `#{cmd}`
|
||||
|
Loading…
x
Reference in New Issue
Block a user