diff options
author | Marc A. Paradise <marc.paradise@gmail.com> | 2022-10-11 15:33:00 -0400 |
---|---|---|
committer | Marc A. Paradise <marc.paradise@gmail.com> | 2022-10-11 15:34:40 -0400 |
commit | 9677131afbaf6d400af49452b6081d927f40e9b8 (patch) | |
tree | c40e342fb063fe562358c81abe1a7bd0d0d27a8d | |
parent | 8a5e85e84a778167b8df732c28e4b7da530edd32 (diff) | |
download | ohai-9677131afbaf6d400af49452b6081d927f40e9b8.tar.gz |
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 <marc.paradise@gmail.com>
-rw-r--r-- | lib/ohai/plugins/ec2.rb | 3 |
1 files changed, 1 insertions, 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 |