Fix brew style

This commit is contained in:
Bo Anderson 2021-08-13 13:49:52 +01:00
parent 9589416fd4
commit e8b82bbe1e
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
3 changed files with 11 additions and 15 deletions

View File

@ -161,11 +161,7 @@ module Homebrew
end
@parser.public_send(method, *names, *wrap_option_desc(description)) do |value|
odisabled "the `#{names.first}` switch", replacement unless replacement.nil?
value = if names.any? { |name| name.start_with?("--[no-]") }
value
else
true
end
value = true if names.none? { |name| name.start_with?("--[no-]") }
set_switch(*names, value: value, from: :args)
end

View File

@ -2002,7 +2002,7 @@ class Formula
bottle_spec.collector.each_key do |os|
collector_os = bottle_spec.collector[os]
os_cellar = collector_os[:cellar]
os_cellar = os_cellar.is_a?(Symbol) ? os_cellar.inspect : os_cellar
os_cellar = os_cellar.inspect if os_cellar.is_a?(Symbol)
checksum = collector_os[:checksum].hexdigest
filename = Bottle::Filename.create(self, os, bottle_spec.rebuild)

View File

@ -103,15 +103,15 @@ class Sandbox
ensure
seatbelt.unlink
sleep 0.1 # wait for a bit to let syslog catch up the latest events.
syslog_args = %W[
-F $((Time)(local))\ $(Sender)[$(PID)]:\ $(Message)
-k Time ge #{@start.to_i}
-k Message S deny
-k Sender kernel
-o
-k Time ge #{@start.to_i}
-k Message S deny
-k Sender sandboxd
syslog_args = [
"-F", "$((Time)(local)) $(Sender)[$(PID)]: $(Message)",
"-k", "Time", "ge", @start.to_i.to_s,
"-k", "Message", "S", "deny",
"-k", "Sender", "kernel",
"-o",
"-k", "Time", "ge", @start.to_i.to_s,
"-k", "Message", "S", "deny",
"-k", "Sender", "sandboxd"
]
logs = Utils.popen_read("syslog", *syslog_args)