developer/bin/list_login_items_for_app: fix RuboCop style.

See https://github.com/Homebrew/brew/pull/7867.
This commit is contained in:
Mike McQuaid
2020-07-27 10:39:13 +01:00
parent 07e0fa1b5d
commit 2e30906d5c
+12 -12
View File
@@ -14,25 +14,25 @@ require "open3"
###
def usage
<<-EOS
Usage: list_login_items_for_app <path.app>
<<~EOS
Usage: list_login_items_for_app <path.app>
Given an Application (app) bundle directory on disk, find all
login items associated with that app, which you can use in a
Cask uninstall stanza, eg
Given an Application (app) bundle directory on disk, find all
login items associated with that app, which you can use in a
Cask uninstall stanza, eg
uninstall login_item: 'login item name'
uninstall login_item: 'login item name'
Note that you will likely need to have opened the app at least
once for any login items to be present.
Note that you will likely need to have opened the app at least
once for any login items to be present.
See CONTRIBUTING.md for more information.
See CONTRIBUTING.md for more information.
EOS
EOS
end
def process_args
if ARGV.first =~ %r{^-+h(?:elp)?$}
if /^-+h(?:elp)?$/.match?(ARGV.first)
puts usage
exit 0
elsif ARGV.length == 1
@@ -49,7 +49,7 @@ def list_login_items_for_app(app_path)
"tell application \"System Events\" to get the name of every login item " \
"whose path contains \"#{File.basename(app_path)}\""
)
if status.exitstatus > 0
if status.exitstatus.positive?
$stderr.puts err
exit status.exitstatus
end