aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/--version.rb12
-rw-r--r--Library/Homebrew/manpages/brew.1.md.erb3
2 files changed, 12 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/--version.rb b/Library/Homebrew/cmd/--version.rb
new file mode 100644
index 000000000..9a571abe1
--- /dev/null
+++ b/Library/Homebrew/cmd/--version.rb
@@ -0,0 +1,12 @@
+#: * `--version`:
+#: Print the version number of Homebrew to standard output and exit.
+
+module Homebrew
+ def __version
+ # As a special case, `--version` is implemented directly in `brew.rb`. This
+ # file merely serves as a container for the documentation. It also catches
+ # the case where running `brew --version` with additional arguments would
+ # produce a rather cryptic message about a non-existent `--version` command.
+ raise UsageError
+ end
+end
diff --git a/Library/Homebrew/manpages/brew.1.md.erb b/Library/Homebrew/manpages/brew.1.md.erb
index b6726089e..92acb86ee 100644
--- a/Library/Homebrew/manpages/brew.1.md.erb
+++ b/Library/Homebrew/manpages/brew.1.md.erb
@@ -50,9 +50,6 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
<%= commands.join("\n") %>
- * `--version`:
- Print the version number of brew to standard error and exit.
-
## EXTERNAL COMMANDS
Homebrew, like `git`(1), supports external commands. These are executable