Shorten HOMEBREW_HELP set/unset
This commit is contained in:
parent
098305e679
commit
16faf6fca9
@ -116,16 +116,11 @@ begin
|
|||||||
if Process.uid.zero? && !brew_uid.zero?
|
if Process.uid.zero? && !brew_uid.zero?
|
||||||
tap_commands += %W[/usr/bin/sudo -u ##{brew_uid}]
|
tap_commands += %W[/usr/bin/sudo -u ##{brew_uid}]
|
||||||
end
|
end
|
||||||
if help_flag
|
# 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")
|
|
||||||
end
|
|
||||||
tap_commands += %W[#{HOMEBREW_BREW_FILE} tap #{possible_tap}]
|
tap_commands += %W[#{HOMEBREW_BREW_FILE} tap #{possible_tap}]
|
||||||
safe_system(*tap_commands)
|
safe_system(*tap_commands)
|
||||||
if help_flag
|
ENV["HOMEBREW_HELP"] = "1" if help_flag
|
||||||
# Restore HOMEBREW_HELP after the tap
|
|
||||||
ENV["HOMEBREW_HELP"] = "1"
|
|
||||||
end
|
|
||||||
exec HOMEBREW_BREW_FILE, cmd, *ARGV
|
exec HOMEBREW_BREW_FILE, cmd, *ARGV
|
||||||
end
|
end
|
||||||
rescue UsageError => e
|
rescue UsageError => e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user