From f64cf7ddf79259a71c5adfdcd1ecba9b85122b01 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 18 Feb 2020 15:59:16 -0800 Subject: Chefstyle fixes identified with Rubocop 0.80 The new Rubocop detects more unnecessary returns. This fixes these ahead of time so we can roll out the new Rubocop engine without breaking builds later. Signed-off-by: Tim Smith --- spec/support/platform_helpers.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index 7c2edc426d..c92b3dca39 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -222,16 +222,16 @@ def selinux_enabled? cmd_result = cmd.run_command case cmd_result.exitstatus when 1 - return false + false when 0 - return true + true else raise "Unknown exit code from command #{selinuxenabled_path}: #{cmd.exitstatus}" end else # We assume selinux is not enabled if selinux utils are not # installed. - return false + false end end -- cgit v1.2.1