parent
4cb88b7e1e
commit
583a754d9f
@ -113,13 +113,9 @@ begin
|
|||||||
|
|
||||||
odie "Unknown command: #{cmd}" if !possible_tap || possible_tap.installed?
|
odie "Unknown command: #{cmd}" if !possible_tap || possible_tap.installed?
|
||||||
|
|
||||||
brew_uid = HOMEBREW_BREW_FILE.stat.uid
|
|
||||||
tap_commands = []
|
|
||||||
tap_commands += %W[/usr/bin/sudo -u ##{brew_uid}] if Process.uid.zero? && !brew_uid.zero?
|
|
||||||
# Unset HOMEBREW_HELP to avoid confusing the tap
|
# Unset HOMEBREW_HELP to avoid confusing the tap
|
||||||
ENV.delete("HOMEBREW_HELP") if help_flag
|
ENV.delete("HOMEBREW_HELP") if help_flag
|
||||||
tap_commands += %W[#{HOMEBREW_BREW_FILE} tap #{possible_tap}]
|
safe_system HOMEBREW_BREW_FILE, "tap", possible_tap.name
|
||||||
safe_system(*tap_commands)
|
|
||||||
ENV["HOMEBREW_HELP"] = "1" if help_flag
|
ENV["HOMEBREW_HELP"] = "1" if help_flag
|
||||||
exec HOMEBREW_BREW_FILE, cmd, *ARGV
|
exec HOMEBREW_BREW_FILE, cmd, *ARGV
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user