From 9677131afbaf6d400af49452b6081d927f40e9b8 Mon Sep 17 00:00:00 2001 From: "Marc A. Paradise" Date: Tue, 11 Oct 2022 15:33:00 -0400 Subject: Fix linter error Makes this function a one-liner too, because the return is implicit and the evaluation of the conditionals will yield true or false. Signed-off-by: Marc A. Paradise --- lib/ohai/plugins/ec2.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ohai/plugins/ec2.rb b/lib/ohai/plugins/ec2.rb index 1a7c1690..e1855434 100644 --- a/lib/ohai/plugins/ec2.rb +++ b/lib/ohai/plugins/ec2.rb @@ -104,8 +104,7 @@ Ohai.plugin(:EC2) do # a single check that combines all the various detection methods for EC2 # @return [Boolean] Does the system appear to be on EC2 def looks_like_ec2? - return true if hint?("ec2") - return true if has_ec2_xen_uuid? || has_ec2_amazon_dmi? || has_ec2_xen_dmi? || has_ec2_identifying_number? + hint?("ec2") || has_ec2_xen_uuid? || has_ec2_amazon_dmi? || has_ec2_xen_dmi? || has_ec2_identifying_number? end collect_data do -- cgit v1.2.1