From 2aef75f422d211b3021658954f9a2eaee6a482bd Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 27 Jul 2020 12:57:58 +0100 Subject: [PATCH] developer/bin/list_running_app_ids: fix RuboCop style. See https://github.com/Homebrew/brew/pull/7867. --- developer/bin/list_running_app_ids | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/developer/bin/list_running_app_ids b/developer/bin/list_running_app_ids index 1225c3c261..8bb3169cc3 100755 --- a/developer/bin/list_running_app_ids +++ b/developer/bin/list_running_app_ids @@ -23,10 +23,10 @@ $COLUMNS = IO.console.winsize.last ### def check_ruby - if RUBY_VERSION.to_f < 2.0 - print "You are currently using Ruby ", RUBY_VERSION, ", but version 2.0 or above is required." - exit 1 - end + return if RUBY_VERSION.to_f >= 2.0 + + print "You are currently using Ruby ", RUBY_VERSION, ", but version 2.0 or above is required." + exit 1 end def usage @@ -64,8 +64,9 @@ def process_args end def load_apps - out, err, status = Open3.capture3("/usr/bin/osascript", "-e", - 'tell application "System Events" to get (name, bundle identifier, unix id) of every process') + out, err, status = + Open3.capture3("/usr/bin/osascript", "-e", + 'tell application "System Events" to get (name, bundle identifier, unix id) of every process') if status.exitstatus.positive? puts err exit status.exitstatus