sudo_check: don't use a set

This is unnecessary here because we use it only once. The difference
won't be noticeable but the check is ~5 times faster now.

Closes Homebrew/homebrew#40901.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
Baptiste Fontaine 2015-06-20 00:11:17 +02:00
parent 05d9622c02
commit 8ef8f0f615

View File

@ -98,7 +98,7 @@ begin
cmd = aliases[cmd] if aliases[cmd]
sudo_check = Set.new %w[ install link pin unpin upgrade ]
sudo_check = %w[ install link pin unpin upgrade ]
if sudo_check.include? cmd
if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero?