diff --git a/cmd/lib/check.rb b/cmd/lib/check.rb index f44a9958e1..d44b502b66 100644 --- a/cmd/lib/check.rb +++ b/cmd/lib/check.rb @@ -29,11 +29,10 @@ module Check format_launchjob = lambda { |file| name = file.basename(".plist").to_s - xml, = system_command! "plutil", args: ["-convert", "xml1", "-o", "-", "--", file], - print_stderr: false, - sudo: true + result = system_command "plutil", args: ["-convert", "xml1", "-o", "-", "--", file], sudo: true + return name unless result.success? - label = Plist.parse_xml(xml)["Label"] + label = result.plist["Label"] (name == label) ? name : "#{name} (#{label})" }