Merge pull request #3459 from wendorf/show_custom_command_help
Custom commands can show help
This commit is contained in:
commit
0cd50400c7
@ -69,6 +69,14 @@ begin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
unless internal_cmd
|
||||||
|
# Add contributed commands to PATH before checking.
|
||||||
|
homebrew_path.append(Tap.cmd_directories)
|
||||||
|
|
||||||
|
# External commands expect a normal PATH
|
||||||
|
ENV["PATH"] = homebrew_path
|
||||||
|
end
|
||||||
|
|
||||||
# Usage instructions should be displayed if and only if one of:
|
# Usage instructions should be displayed if and only if one of:
|
||||||
# - a help flag is passed AND a command is matched
|
# - a help flag is passed AND a command is matched
|
||||||
# - a help flag is passed AND there is no command specified
|
# - a help flag is passed AND there is no command specified
|
||||||
@ -88,14 +96,6 @@ begin
|
|||||||
system(HOMEBREW_BREW_FILE, "uninstall", "--force", "brew-cask")
|
system(HOMEBREW_BREW_FILE, "uninstall", "--force", "brew-cask")
|
||||||
end
|
end
|
||||||
|
|
||||||
unless internal_cmd
|
|
||||||
# Add contributed commands to PATH before checking.
|
|
||||||
homebrew_path.append(Tap.cmd_directories)
|
|
||||||
|
|
||||||
# External commands expect a normal PATH
|
|
||||||
ENV["PATH"] = homebrew_path
|
|
||||||
end
|
|
||||||
|
|
||||||
if internal_cmd
|
if internal_cmd
|
||||||
Homebrew.send cmd.to_s.tr("-", "_").downcase
|
Homebrew.send cmd.to_s.tr("-", "_").downcase
|
||||||
elsif which "brew-#{cmd}"
|
elsif which "brew-#{cmd}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user