From e15a3e07fd626a543e993f75c4721140e0047022 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 19 Sep 2020 04:48:17 +0200 Subject: [PATCH] Fix non-array uninstall directives. (#89549) --- cmd/lib/check.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/lib/check.rb b/cmd/lib/check.rb index 16a574ecff..7942c8c70a 100644 --- a/cmd/lib/check.rb +++ b/cmd/lib/check.rb @@ -127,13 +127,13 @@ module Check .added .reject { |id| id.match?(/\.\d+\Z/) } - if (running_apps - uninstall_directives.fetch(:quit, [])).any? + if (running_apps - Array(uninstall_directives[:quit])).any? message = "Some applications are still running, add them to #{Formatter.identifier("uninstall quit:")}\n" message += running_apps.join("\n") errors << message end - if (loaded_launchjobs - uninstall_directives.fetch(:launchctl, [])).any? + if (loaded_launchjobs - Array(uninstall_directives[:launchctl])).any? message = "Some launch jobs were not unloaded, add them to #{Formatter.identifier("uninstall launchctl:")}\n" message += loaded_launchjobs.join("\n") errors << message