Permalink
Browse files

Fix -v option

  • Loading branch information...
1 parent 3396a31 commit 9fe1a1ebfe9ea769f11e253a0a5e6c7bef9ea8d0 @danlucraft committed Jan 12, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −0 bin/redcar
  2. +0 −1 lib/redcar/usage.rb
  3. +3 −1 lib/redcar_quick_start.rb
View
1 bin/redcar
@@ -9,6 +9,7 @@ file = File.readlink(file) while File.symlink?(file)
$LOAD_PATH.unshift File.expand_path('../../lib', file)
require "redcar_quick_start"
+
if ARGV.include? '--silent'
# reopen the standard pipes to nothingness if we were forked as part of jruby
STDIN.reopen Redcar.null_device
View
1 lib/redcar/usage.rb
@@ -9,7 +9,6 @@ def version_string
def version_requested
if ARGV.include?("-v")
- puts "Redcar #{Redcar::VERSION}"
exit
end
end
View
4 lib/redcar_quick_start.rb
@@ -33,7 +33,9 @@ def self.read_stdin
end
def self.try_to_load_via_drb
- return if ARGV.find {|arg| arg == "--multiple-instance" || arg == '--help' || arg == '-h'}
+ if ARGV.find {|arg| arg == "--multiple-instance" || arg == '--help' || arg == '-h' || arg == "-v"}
+ return false
+ end
begin
begin
TCPSocket.new('127.0.0.1', drb_port).close

0 comments on commit 9fe1a1e

Please sign in to comment.