cmd/uninstall: handle unparsed arguments.

If `Homebrew.args` hasn't yet been populated then `named` will return
`nil`. Instead, ensure it is an array before we try to `join` it.

This is pretty much only a test-time problem but has been causing flaky
builds.
This commit is contained in:
Mike McQuaid 2020-03-11 11:21:28 +00:00
parent 30c4383e86
commit 40432d86f9
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -130,7 +130,7 @@ module Homebrew
protected protected
def sample_command def sample_command
"brew uninstall --ignore-dependencies #{Homebrew.args.named.join(" ")}" "brew uninstall --ignore-dependencies #{Array(Homebrew.args.named).join(" ")}"
end end
def are_required_by_deps def are_required_by_deps