Skip to content
Snippets Groups Projects
Commit 8ef8f0f6 authored by Baptiste Fontaine's avatar Baptiste Fontaine
Browse files

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: default avatarBaptiste Fontaine <batifon@yahoo.fr>
parent 05d9622c
No related branches found
No related tags found
No related merge requests found
......@@ -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?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment