From 40432d86f94c52fb7ee5249fbce34c20e18b15ec Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 11 Mar 2020 11:21:28 +0000 Subject: [PATCH] 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. --- Library/Homebrew/cmd/uninstall.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index 22c1f8651b..5637d72c4b 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -130,7 +130,7 @@ module Homebrew protected def sample_command - "brew uninstall --ignore-dependencies #{Homebrew.args.named.join(" ")}" + "brew uninstall --ignore-dependencies #{Array(Homebrew.args.named).join(" ")}" end def are_required_by_deps