about summary refs log tree commit homepage
path: root/lib/mongrel/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mongrel/command.rb')
-rw-r--r--lib/mongrel/command.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mongrel/command.rb b/lib/mongrel/command.rb
index 20466e2..1071944 100644
--- a/lib/mongrel/command.rb
+++ b/lib/mongrel/command.rb
@@ -186,6 +186,9 @@ module Mongrel
         if !cmd_name or cmd_name == "?" or cmd_name == "help"
           print_command_list
           return true
+        elsif cmd_name == "--version"
+          STDERR.puts "Mongrel Web Server #{Mongrel::Const::MONGREL_VERSION}"
+          return true
         end
 
         # command exists, set it up and validate it
@@ -194,7 +197,7 @@ module Mongrel
         rescue
           STDERR.puts "INVALID COMMAND: #$!"
           print_command_list
-          return
+          return false
         end
 
         # Normally the command is NOT valid right after being created
@@ -208,6 +211,7 @@ module Mongrel
             command.run
           end
         end
+
         return true
       end