From 795642ea97ed1e5989ed1c5cf2862550bd87d2a2 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 19 Mar 2024 08:46:47 +0000 Subject: [PATCH] rubocops/service: allow require_root to be used without run. Fixes https://github.com/Homebrew/brew/issues/16908 --- Library/Homebrew/rubocops/service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/rubocops/service.rb b/Library/Homebrew/rubocops/service.rb index 4560cbb4a6..d711df7d6a 100644 --- a/Library/Homebrew/rubocops/service.rb +++ b/Library/Homebrew/rubocops/service.rb @@ -37,7 +37,7 @@ module RuboCop offending_node(service_node) problem "Service blocks require `run` or `name` to be defined." elsif !method_calls.key?(:run) - other_method_calls = method_calls.keys - [:name] + other_method_calls = method_calls.keys - [:name, :require_root] if other_method_calls.any? offending_node(service_node) problem "`run` must be defined to use methods other than `name` like #{other_method_calls}."